From bd24b7aec7823c34add391e5137fec9ee0180f2d Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Mon, 1 Mar 2010 22:32:15 +0000 Subject: [PATCH] BUGFIX: Ensure that DataObject::get_one() cache knows which subsite you're on (from r93096) (from r96337) --- code/SiteTreeSubsites.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/SiteTreeSubsites.php b/code/SiteTreeSubsites.php index c9d649f..cbf74a8 100644 --- a/code/SiteTreeSubsites.php +++ b/code/SiteTreeSubsites.php @@ -411,6 +411,13 @@ class SiteTreeSubsites extends SiteTreeDecorator { $this->owner->CrossSubsiteLinkTracking()->setByIDList($linkedPages); } + + /** + * Return a piece of text to keep DataObject cache keys appropriately specific + */ + function cacheKeyComponent() { + return 'subsite-'.Subsite::currentSubsiteID(); + } } ?>