aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2018-09-29 08:55:47 +0900
committerGitHub <noreply@github.com>2018-09-29 08:55:47 +0900
commit3727215591dfe1320233d3800b16a7fa455595ae (patch)
tree17cf6b0dd923ed1eeb7536e6975c4a1c9392feeb
parent7bc343b3a9ef7581e665a9f70f00d494f7a3b62c (diff)
parentb1059f3cf008dbf459d9772f1ae30bf8b336476b (diff)
downloadrails-3727215591dfe1320233d3800b16a7fa455595ae.tar.gz
rails-3727215591dfe1320233d3800b16a7fa455595ae.tar.bz2
rails-3727215591dfe1320233d3800b16a7fa455595ae.zip
Merge pull request #34020 from tgturner/update-cache-docs
Updates expires_in docs
-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.