diff options
author | Leonel Galán <leonel@getstealz.com> | 2017-05-17 15:23:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 15:23:21 -0400 |
commit | 0804e58e1e6a52190a950f863622102b6b21ccb8 (patch) | |
tree | a2d9887906bd2c472edc54907362b93a57f52f0f /activesupport/lib/active_support/cache | |
parent | f5b2a0ef408f01dd9f12b456f5e4bb41ebb4cb76 (diff) | |
parent | 385d9af299fbfac7f063de214d371545bafef5df (diff) | |
download | rails-0804e58e1e6a52190a950f863622102b6b21ccb8.tar.gz rails-0804e58e1e6a52190a950f863622102b6b21ccb8.tar.bz2 rails-0804e58e1e6a52190a950f863622102b6b21ccb8.zip |
Merge branch 'master' into bug/filtered_parameters_class
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r-- | activesupport/lib/active_support/cache/strategy/local_cache.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index 672eb2bb80..91875a56f5 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -115,7 +115,12 @@ module ActiveSupport end def write_entry(key, entry, options) - local_cache.write_entry(key, entry, options) if local_cache + if options[:unless_exist] + local_cache.delete_entry(key, options) if local_cache + else + local_cache.write_entry(key, entry, options) if local_cache + end + super end |