From 46dd185faab6a0387face5700c4b69c69f9f933c Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 9 Apr 2006 17:12:45 +0000 Subject: Cache key for TOutputCache now also uses PagePath. --- framework/Web/UI/WebControls/TOutputCache.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TOutputCache.php') diff --git a/framework/Web/UI/WebControls/TOutputCache.php b/framework/Web/UI/WebControls/TOutputCache.php index a19965b0..76d74b47 100644 --- a/framework/Web/UI/WebControls/TOutputCache.php +++ b/framework/Web/UI/WebControls/TOutputCache.php @@ -257,10 +257,18 @@ class TOutputCache extends TControl implements INamingContainer $name=trim($name); $params[$name]=$request->itemAt($name); } - return self::CACHE_ID_PREFIX.$this->_keyPrefix.$this->getUniqueID().serialize($params); + return $this->getBaseCacheKey().serialize($params); } else - return self::CACHE_ID_PREFIX.$this->_keyPrefix.$this->getUniqueID(); + return $this->getBaseCacheKey(); + } + + /** + * @return string basic cache key without variations + */ + protected function getBaseCacheKey() + { + return self::CACHE_ID_PREFIX.$this->_keyPrefix.$this->getPage()->getPagePath().$this->getUniqueID(); } /** -- cgit v1.2.3