Index: branches/RC/core/kernel/utility/cache.php =================================================================== diff -u -N -r10516 -r10566 --- branches/RC/core/kernel/utility/cache.php (.../cache.php) (revision 10516) +++ branches/RC/core/kernel/utility/cache.php (.../cache.php) (revision 10566) @@ -28,6 +28,11 @@ else { $this->_storage = new CacheStorage(); } + + if (!$this->_storage->isWorking()) { + // when one of above cache storages fails to initialize fallback to memory cache + $this->_storage = new CacheStorage(); + } } /** @@ -102,6 +107,16 @@ class CacheStorage extends Params { /** + * Determines, that cache storage is working fine + * + * @return bool + */ + function isWorking() + { + return true; + } + + /** * Stores value to cache * * @param string $cache_name @@ -154,6 +169,16 @@ } /** + * Determines, that cache storage is working fine + * + * @return bool + */ + function isWorking() + { + return $this->_handler->getVersion() !== false; + } + + /** * Stores value to cache * * @param string $cache_name @@ -208,6 +233,16 @@ } /** + * Determines, that cache storage is working fine + * + * @return bool + */ + function isWorking() + { + return false; + } + + /** * Stores value to cache * * @param string $cache_name