Skip to content

Commit a95438c

Browse files
Document AS::Cache::Store#read options [ci-skip]
1 parent fc7225a commit a95438c

File tree

1 file changed

+7
-1
lines changed
  • activesupport/lib/active_support

1 file changed

+7
-1
lines changed

activesupport/lib/active_support/cache.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,13 @@ def fetch(name, options = nil, &block)
361361
# <tt>:version</tt> options, both of these conditions are applied before
362362
# the data is returned.
363363
#
364-
# Options are passed to the underlying cache implementation.
364+
# ==== Options
365+
#
366+
# * +:version+ - Specifies a version for the cache entry. If the cached
367+
# version does not match the requested version, the read will be treated
368+
# as a cache miss. This feature is used to support recyclable cache keys.
369+
#
370+
# Other options will be handled by the specific cache store implementation.
365371
def read(name, options = nil)
366372
options = merged_options(options)
367373
key = normalize_key(name, options)

0 commit comments

Comments
 (0)