diff options
author | Takumasa Ochi <aeroastro@users.noreply.github.com> | 2017-11-19 03:50:59 +0900 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2017-11-20 14:49:11 -0800 |
commit | b22ee64b5b30c6d5039c292235e10b24b1057f6d (patch) | |
tree | bead1307088117c6c95269f261fdb75242f8ca54 /activesupport/CHANGELOG.md | |
parent | ae7593e7e842ec5efb8d58a7ce005ba55fd4c886 (diff) | |
download | rails-b22ee64b5b30c6d5039c292235e10b24b1057f6d.tar.gz rails-b22ee64b5b30c6d5039c292235e10b24b1057f6d.tar.bz2 rails-b22ee64b5b30c6d5039c292235e10b24b1057f6d.zip |
MemCacheStore: Support expiring counters
Support `expires_in` in `ActiveSupport::Cache::MemCacheStore#increment`
and `#decrement`.
Closes #30716.
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 904dab0e05..88bbafc3a8 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,16 @@ +* MemCacheStore: Support expiring counters. + + Pass `expires_in: [seconds]` to `#increment` and `#decrement` options + to set the Memcached TTL (time-to-live) if the counter doesn't exist. + If the counter exists, Memcached doesn't extend its expiry when it's + incremented or decremented. + + ``` + Rails.cache.increment("my_counter", 1, expires_in: 2.minutes) + ``` + + *Takumasa Ochi* + * Handle `TZInfo::AmbiguousTime` errors Make `ActiveSupport::TimeWithZone` match Ruby's handling of ambiguous |