From 0b1809000376cdeeb84075b6fc24c98198eca19b Mon Sep 17 00:00:00 2001 From: Aaron Carlino Date: Wed, 30 May 2018 16:44:47 +1200 Subject: [PATCH] Docs updates --- docs/en/04_Changelogs/3.7.0.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/04_Changelogs/3.7.0.md b/docs/en/04_Changelogs/3.7.0.md index 48a8825b0..244965f60 100644 --- a/docs/en/04_Changelogs/3.7.0.md +++ b/docs/en/04_Changelogs/3.7.0.md @@ -2,21 +2,21 @@ ### Versioned cache segmentation -The cache API now maintains separate cache pools for each versioned stage. This prevents users from caching draft data and then exposing it on the live stage. +`SS_Cache` now maintains separate cache pools for each versioned stage. This prevents developers from caching draft data and then accidentally exposing it on the live stage without potentially required authorisation checks. Unless you rely on caching across stages, you don't need to change your own code for this change to take effect. Note that cache keys will be internally rewritten, causing any existing cache items to become invalid when this change is deployed. ```php // Before: $cache = SS_Cache::factory('myapp'); -Versioned::set_reading_mode('Stage.Live'); -$cache->save('Some draft content. Not for public viewing yet.', 'my_key'); Versioned::set_reading_mode('Stage.Stage'); +$cache->save('Some draft content. Not for public viewing yet.', 'my_key'); +Versioned::set_reading_mode('Stage.Live'); $cache->load('my_key'); // 'Some draft content. Not for public viewing yet' // After: $cache = SS_Cache::factory('myapp'); -Versioned::set_reading_mode('Stage.Live'); -$cache->save('Some draft content. Not for public viewing yet.', 'my_key'); Versioned::set_reading_mode('Stage.Stage'); +$cache->save('Some draft content. Not for public viewing yet.', 'my_key'); +Versioned::set_reading_mode('Stage.Live'); $cache->load('my_key'); // null ``` Data that is not content sensitive can be cached across stages by simply opting out of the segmented cache with the `disable-container` argument.