Caching while not authenticated is perfectly valid
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Nov 2010 05:04:14 +0000 (22:04 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Nov 2010 07:01:24 +0000 (00:01 -0700)
framework/Core/lib/Horde/Registry.php

index b46af48..682e272 100644 (file)
@@ -1500,13 +1500,6 @@ class Horde_Registry
      */
     protected function _saveCacheVar($name, $expire = false)
     {
-        /* Using cache while not authenticated isn't possible because,
-         * although storage is possible, retrieval isn't since there is no
-         * MD5 sum in the session to use to build the cache IDs. */
-        if (!$this->getAuth()) {
-            return;
-        }
-
         $ob = $GLOBALS['injector']->getInstance('Horde_Cache');
 
         if ($expire) {
@@ -1537,11 +1530,7 @@ class Horde_Registry
             return true;
         }
 
-        /* Using cache while not authenticated isn't possible because,
-         * although storage is possible, retrieval isn't since there is no
-         * MD5 sum in the session to use to build the cache IDs. */
-        if ($this->getAuth() &&
-            ($id = $this->_getCacheId($name))) {
+        if ($id = $this->_getCacheId($name)) {
             $result = $GLOBALS['injector']->getInstance('Horde_Cache')->get($id, 86400);
             if ($result !== false) {
                 $this->_cache[$name] = unserialize($result);