web/lib/Zend/Controller/Action/Helper/Cache.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
--- a/web/lib/Zend/Controller/Action/Helper/Cache.php	Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Controller/Action/Helper/Cache.php	Thu Mar 21 19:50:53 2013 +0100
@@ -14,9 +14,9 @@
  *
  * @category   Zend
  * @package    Zend_Controller
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: Cache.php 22662 2010-07-24 17:37:36Z mabe $
+ * @version    $Id: Cache.php 24853 2012-05-31 23:19:27Z adamlundrigan $
  */
 
 /**
@@ -37,7 +37,7 @@
 /**
  * @category   Zend
  * @package    Zend_Controller
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Controller_Action_Helper_Cache
@@ -64,7 +64,7 @@
      * @var array
      */
     protected $_tags = array();
-    
+
     /**
      * Indexed map of Extensions by Controller and Action
      *
@@ -130,16 +130,26 @@
     public function removePage($relativeUrl, $recursive = false)
     {
         $cache = $this->getCache(Zend_Cache_Manager::PAGECACHE);
+        $encodedCacheId = $this->_encodeCacheId($relativeUrl);
+
         if ($recursive) {
             $backend = $cache->getBackend();
             if (($backend instanceof Zend_Cache_Backend)
                 && method_exists($backend, 'removeRecursively')
             ) {
-                return $backend->removeRecursively($relativeUrl);
+                $result = $backend->removeRecursively($encodedCacheId);
+                if (is_null($result) ) {
+                    $result = $backend->removeRecursively($relativeUrl);
+                }
+                return $result;
             }
         }
 
-        return $cache->remove($relativeUrl);
+        $result = $cache->remove($encodedCacheId);
+        if (is_null($result) ) {
+            $result = $cache->remove($relativeUrl);
+        }
+        return $result;
     }
 
     /**
@@ -189,7 +199,7 @@
                 ->start($this->_encodeCacheId($reqUri), $tags, $extension);
         }
     }
-    
+
     /**
      * Encode a Cache ID as hexadecimal. This is a workaround because Backend ID validation
      * is trapped in the Frontend classes. Will try to get this reversed for ZF 2.0