aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/caching_with_rails.md
diff options
context:
space:
mode:
authorGraham Turner <turnertgraham@gmail.com>2018-09-28 13:29:38 -0400
committerGraham Turner <turnertgraham@gmail.com>2018-09-28 13:29:38 -0400
commitb1059f3cf008dbf459d9772f1ae30bf8b336476b (patch)
tree50582ecd4678008e215b2332cf754ef73068b230 /guides/source/caching_with_rails.md
parent9fa4342970e2c8ac24bcc595f120ab65e88095a4 (diff)
downloadrails-b1059f3cf008dbf459d9772f1ae30bf8b336476b.tar.gz
rails-b1059f3cf008dbf459d9772f1ae30bf8b336476b.tar.bz2
rails-b1059f3cf008dbf459d9772f1ae30bf8b336476b.zip
Updates expires_in docs
Previously the documentation for expires_in suggested that the option was available for all cache stores. This clarifies that the behavior can be supported, but is not always supported.
Diffstat (limited to 'guides/source/caching_with_rails.md')
-rw-r--r--guides/source/caching_with_rails.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index 8aaa71c557..321eee637f 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -362,7 +362,7 @@ This class provides the foundation for interacting with the cache in Rails. This
The main methods to call are `read`, `write`, `delete`, `exist?`, and `fetch`. The fetch method takes a block and will either return an existing value from the cache, or evaluate the block and write the result to the cache if no value exists.
-There are some common options used by all cache implementations. These can be passed to the constructor or the various methods to interact with entries.
+There are some common options that can be used by all cache implementations. These can be passed to the constructor or the various methods to interact with entries.
* `:namespace` - This option can be used to create a namespace within the cache store. It is especially useful if your application shares a cache with other applications.
@@ -370,7 +370,7 @@ There are some common options used by all cache implementations. These can be pa
* `:compress_threshold` - Defaults to 1kB. Cache entries larger than this threshold, specified in bytes, are compressed.
-* `:expires_in` - This option sets an expiration time in seconds for the cache entry when it will be automatically removed from the cache.
+* `:expires_in` - This option sets an expiration time in seconds for the cache entry, if the cache store supports it, when it will be automatically removed from the cache.
* `:race_condition_ttl` - This option is used in conjunction with the `:expires_in` option. It will prevent race conditions when cache entries expire by preventing multiple processes from simultaneously regenerating the same entry (also known as the dog pile effect). This option sets the number of seconds that an expired entry can be reused while a new value is being regenerated. It's a good practice to set this value if you use the `:expires_in` option.