diff --git a/core/manifest/ConfigManifest.php b/core/manifest/ConfigManifest.php index 20aec2214..caf63f716 100644 --- a/core/manifest/ConfigManifest.php +++ b/core/manifest/ConfigManifest.php @@ -110,7 +110,7 @@ class SS_ConfigManifest { /** * Provides a hook for mock unit tests despite no DI - * @return Zend_Cache_Frontend + * @return Zend_Cache_Core */ protected function getCache() { diff --git a/core/manifest/SilverStripeVersionProvider.php b/core/manifest/SilverStripeVersionProvider.php index 5223055b9..b1cd92426 100644 --- a/core/manifest/SilverStripeVersionProvider.php +++ b/core/manifest/SilverStripeVersionProvider.php @@ -83,7 +83,11 @@ class SilverStripeVersionProvider $lockData = array(); if ($cache) { - $cache = SS_Cache::factory('SilverStripeVersionProvider_composerlock', 'Output', array('disable-segmentation' => true)); + $cache = SS_Cache::factory( + 'SilverStripeVersionProvider_composerlock', + 'Output', + array('disable-segmentation' => true) + ); $cacheKey = filemtime($composerLockPath); if ($versions = $cache->load($cacheKey)) { $lockData = json_decode($versions, true); diff --git a/i18n/i18n.php b/i18n/i18n.php index 6100dbe9f..c1912fc19 100644 --- a/i18n/i18n.php +++ b/i18n/i18n.php @@ -118,7 +118,7 @@ class i18n extends SS_Object implements TemplateGlobalProvider, Flushable { /** * Return an instance of the cache used for i18n data. - * @return Zend_Cache + * @return Zend_Cache_Core */ public static function get_cache() { return SS_Cache::factory( diff --git a/view/SSViewer.php b/view/SSViewer.php index c78b05fc9..85a540d92 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -31,10 +31,10 @@ class SSViewer_Scope { const UP_INDEX = 4; const CURRENT_INDEX = 5; const ITEM_OVERLAY = 6; - + // The stack of previous "global" items // An indexed array of item, item iterator, item iterator total, pop index, up index, current index & parent overlay - private $itemStack = array(); + private $itemStack = array(); // The current "global" item (the one any lookup starts from) protected $item; @@ -1016,6 +1016,14 @@ class SSViewer implements Flushable { } } + /** + * @return Zend_Cache_Core + */ + protected static function defaultPartialCacheStore() + { + return SS_Cache::factory('cacheblock', 'Output', array('disable-segmentation' => true)); + } + /** * Call this to disable rewriting of links. This is useful in Ajax applications. * It returns the SSViewer objects, so that you can call new SSViewer("X")->dontRewriteHashlinks()->process(); @@ -1082,7 +1090,7 @@ class SSViewer implements Flushable { */ public static function flush_cacheblock_cache($force = false) { if (!self::$cacheblock_cache_flushed || $force) { - $cache = SS_Cache::factory('cacheblock'); + $cache = self::defaultPartialCacheStore(); $backend = $cache->getBackend(); if( @@ -1120,7 +1128,7 @@ class SSViewer implements Flushable { * @return Zend_Cache_Core */ public function getPartialCacheStore() { - return $this->partialCacheStore ? $this->partialCacheStore : SS_Cache::factory('cacheblock'); + return $this->partialCacheStore ? $this->partialCacheStore : self::defaultPartialCacheStore(); } /**