diff options
author | Edouard CHIN <edouard.chin@shopify.com> | 2019-07-11 16:25:40 +0200 |
---|---|---|
committer | Edouard CHIN <edouard.chin@shopify.com> | 2019-07-11 16:35:14 +0200 |
commit | f08bf726d3038f062dd7485614d1ea85d952f121 (patch) | |
tree | 527bfa072f66a4e5846b4dd2b099056ce029bfd6 /activesupport/test/fixtures/autoload | |
parent | 84ff4f6ea2a118b47160e3fe7ed29bff52c2a7a2 (diff) | |
download | rails-f08bf726d3038f062dd7485614d1ea85d952f121.tar.gz rails-f08bf726d3038f062dd7485614d1ea85d952f121.tar.bz2 rails-f08bf726d3038f062dd7485614d1ea85d952f121.zip |
Return a copy of the cache entry when local_cache exists:
- When the local cache exists (during the request lifecycle), the
entry returned from the LocalStore is passed as a reference which
means mutable object can accidentaly get modified.
This behaviour seems unnecessarily unsafe and is prone to
issues like it happened in our application.
This patch dup the `Entry` returned from the cache and dup it's
internal value.
Diffstat (limited to 'activesupport/test/fixtures/autoload')
0 files changed, 0 insertions, 0 deletions