From: <gem...@li...> - 2012-01-26 08:47:15
|
Revision: 423 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=423&view=rev Author: mennodekker Date: 2012-01-26 08:47:09 +0000 (Thu, 26 Jan 2012) Log Message: ----------- prevent cache clashes on apc Modified Paths: -------------- trunk/library/classes/GemsEscort.php Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2012-01-25 14:33:44 UTC (rev 422) +++ trunk/library/classes/GemsEscort.php 2012-01-26 08:47:09 UTC (rev 423) @@ -147,13 +147,17 @@ */ protected function _initCache() { - $cache = null; - $exists = false; + $cache = null; + $exists = false; + $cachePrefix = GEMS_PROJECT_NAME . '_'; + // Check if APC extension is loaded if( extension_loaded('apc') ) { $cacheBackend = 'Apc'; $cacheBackendOptions = array(); + //Add path to the prefix as APC is a SHARED cache + $cachePrefix .= md5(APPLICATION_PATH); $exists = true; } else { $cacheBackend = 'File'; @@ -175,7 +179,7 @@ * not support automatic cleaning. */ $cacheFrontendOptions = array('automatic_serialization' => true, - 'cache_id_prefix' => GEMS_PROJECT_NAME . '_', + 'cache_id_prefix' => $cachePrefix, 'automatic_cleaning_factor' => 0); $cache = Zend_Cache::factory('Core', $cacheBackend, $cacheFrontendOptions, $cacheBackendOptions); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |