aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2016-04-18 08:16:50 -0700
committerJeremy Daer <jeremydaer@gmail.com>2016-04-18 08:35:55 -0700
commitb39131e8bdb65a9ee51e49d7fe8f058e702e173b (patch)
tree82525d1e79ca4bc22f99256a5bad10bad21b20fe /activesupport/CHANGELOG.md
parent71657146374595b6b9b04916649922fa4f5f512d (diff)
parenta712acc42543b575a623e1a8880c0e9dd5505cfa (diff)
downloadrails-b39131e8bdb65a9ee51e49d7fe8f058e702e173b.tar.gz
rails-b39131e8bdb65a9ee51e49d7fe8f058e702e173b.tar.bz2
rails-b39131e8bdb65a9ee51e49d7fe8f058e702e173b.zip
Merge pull request #24577 from mechanicles/fix-fetch-cache-miss
Fix forced cache miss for fetch when called without a block.
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index b2ab5ffcbe..bcf3b10208 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,11 @@
+* `Cache#fetch(key, force: true)` forces a cache miss, so it must be called
+ with a block to provide a new value to cache. Fetching with `force: true`
+ but without a block now raises ArgumentError.
+
+ cache.fetch('key', force: true) # => ArgumentError
+
+ *Santosh Wadghule*
+
* `ActiveSupport::Duration` supports weeks and hours.
[1.hour.inspect, 1.hour.value, 1.hour.parts]