diff --git a/app/config/bootstrap/cache.php b/app/config/bootstrap/cache.php index 7384f618..5a44fd67 100644 --- a/app/config/bootstrap/cache.php +++ b/app/config/bootstrap/cache.php @@ -34,7 +34,8 @@ Cache::config(array( 'default' => array( 'adapter' => $apc ? 'Apc' : 'File', - 'strategies' => $apc ? array() : array('Serializer') + 'strategies' => $apc ? array() : array('Serializer'), + 'scope' => $apc ? null : md5(LITHIUM_APP_PATH) ) )); @@ -52,13 +53,8 @@ if (!Environment::is('production')) { return; } -$cacheScope = md5(LITHIUM_APP_PATH); - -/** - * Caches paths for auto-loaded and service-located classes when in production. - */ -Dispatcher::applyFilter('run', function($self, $params, $chain) use ($cacheScope) { - $cacheKey = "{$cacheScope}.core.libraries"; +Dispatcher::applyFilter('run', function($self, $params, $chain) { + $cacheKey = 'core.libraries'; if ($cached = Cache::read('default', $cacheKey)) { $cached = (array) $cached + Libraries::cache();