Skip to main content

Module versioning

Module versioning 

Source
Expand description

Recyclable cache versioning (Rails cache_versioning): a stored entry carries a version, and a read with a different version is a miss — so bumping the version cheaply invalidates without deleting keys.

Functions§

read_versioned
Read key only if its stored version matches version; a mismatch (or a missing key) is a miss.
versioned_key
A versioned key: versioned_key("post/1", 3)"post/1:v3".
write_versioned
Store value under key tagged with version.