diff --git a/lib/doctrine/template/Cachetaggable.class.php b/lib/doctrine/template/Cachetaggable.class.php index 6acb1d7..83549fa 100644 --- a/lib/doctrine/template/Cachetaggable.class.php +++ b/lib/doctrine/template/Cachetaggable.class.php @@ -171,9 +171,17 @@ public function addTags ($tags) */ public function addTag ($tagName, $tagVersion) { - $this - ->getContentTagHandler() - ->setContentTag($tagName, $tagVersion, $this->getInvokerNamespace()); + + try + { + $this + ->getContentTagHandler() + ->setContentTag($tagName, $tagVersion, $this->getInvokerNamespace()); + } + catch (sfCacheDisabledException $e) + { + + } } /** diff --git a/lib/exception/sfCacheContextMissingException.class.php b/lib/exception/sfCacheMissingContextException.class.php similarity index 86% rename from lib/exception/sfCacheContextMissingException.class.php rename to lib/exception/sfCacheMissingContextException.class.php index 05ca66f..b9f331d 100644 --- a/lib/exception/sfCacheContextMissingException.class.php +++ b/lib/exception/sfCacheMissingContextException.class.php @@ -13,7 +13,7 @@ * @subpackage exception * @author Ilya Sabelnikov */ - class sfCacheContextMissingException extends sfCacheException + class sfCacheMissingContextException extends sfCacheException { } diff --git a/lib/util/sfCacheTaggingToolkit.class.php b/lib/util/sfCacheTaggingToolkit.class.php index 7ff9288..2963f80 100644 --- a/lib/util/sfCacheTaggingToolkit.class.php +++ b/lib/util/sfCacheTaggingToolkit.class.php @@ -36,7 +36,7 @@ public static function getTaggingCache () if (! sfContext::hasInstance()) { - throw new sfCacheContextMissingException( + throw new sfCacheMissingContextException( sprintf('Content is not initialized for "%s"', __CLASS__) ); } diff --git a/test/data/config/cache_setup.yml b/test/data/config/cache_setup.yml index 994be06..9f6803c 100644 --- a/test/data/config/cache_setup.yml +++ b/test/data/config/cache_setup.yml @@ -1,32 +1,32 @@ -#- -# class: sfMemcacheCache -# param: -# prefix: sf -# persistent: true -# storeCacheInfo: false -# host: localhost -# port: 11211 -# timeout: 1 -# lifetime: 900 +- + class: sfMemcacheCache + param: + prefix: sf + persistent: true + storeCacheInfo: false + host: localhost + port: 11211 + timeout: 1 + lifetime: 900 - class: sfAPCCache param: lifetime: 600 -#- -# class: sfSQLiteTaggingCache -# param: -# database: /sfCacheTaggingPlugin/test/temp/sqlite.db -#- -# class: sfSQLiteTaggingCache -# param: -# database: ":memory:" -#- -# class: sfFileTaggingCache -# param: -# cache_dir: /sfCacheTaggingPlugin/test/temp/file -#- -# class: sfEAcceleratorCache -# param: {} -#- -# class: sfXCacheCache -# param: {} \ No newline at end of file +- + class: sfSQLiteTaggingCache + param: + database: /sfCacheTaggingPlugin/test/temp/sqlite.db +- + class: sfSQLiteTaggingCache + param: + database: ":memory:" +- + class: sfFileTaggingCache + param: + cache_dir: /sfCacheTaggingPlugin/test/temp/file +- + class: sfEAcceleratorCache + param: {} +- + class: sfXCacheCache + param: {} \ No newline at end of file diff --git a/test/functional/frontend/sfDoctrineProxyCacheTest.php b/test/functional/frontend/sfDoctrineProxyCacheTest.php index 81a09ac..015aa24 100644 --- a/test/functional/frontend/sfDoctrineProxyCacheTest.php +++ b/test/functional/frontend/sfDoctrineProxyCacheTest.php @@ -12,9 +12,6 @@ require_once sfConfig::get('sf_symfony_lib_dir') . '/vendor/lime/lime.php'; -// $cc = new sfCacheClearTask(sfContext::getInstance()->getEventDispatcher(), new sfFormatter()); -// $cc->run(); - $t = new lime_test(); $connection = Doctrine::getConnectionByTableName('BlogPost');