[Solar-svn] Revision 3170

pmjones at solarphp.com pmjones at solarphp.com
Tue May 20 15:29:06 CDT 2008


Solar_Cache_Adapter_None: [FIX] Methods add, save, fetch, etc. now return expected booleans.


Modified: trunk/Solar/Cache/Adapter/None.php
===================================================================
--- trunk/Solar/Cache/Adapter/None.php	2008-05-20 15:50:49 UTC (rev 3169)
+++ trunk/Solar/Cache/Adapter/None.php	2008-05-20 20:29:06 UTC (rev 3170)
@@ -24,11 +24,12 @@
      * 
      * @param mixed $data The data to write into the entry.
      * 
-     * @return bool True on success, false on failure.
+     * @return true Always reports a successsful save.
      * 
      */
     public function save($key, $data)
     {
+        return true;
     }
     
     /**
@@ -39,11 +40,12 @@
      * 
      * @param mixed $data The data to write into the entry.
      * 
-     * @return bool True on success, false on failure.
+     * @return true Always reports a successsful add.
      * 
      */
     public function add($key, $data)
     {
+        return true;
     }
     
     /**
@@ -52,11 +54,12 @@
      * 
      * @param string $key The entry ID.
      * 
-     * @return mixed Boolean false on failure, cache data on success.
+     * @return true Always reports a failed fetch.
      * 
      */
     public function fetch($key)
     {
+        return false;
     }
     
     /**
@@ -69,7 +72,7 @@
      * @param string $amt The amount to increment by (default +1).  Using
      * negative values is effectively a decrement.
      * 
-     * @return int The new value of the cache entry.
+     * @return void Never increments.
      * 
      */
     public function increment($key, $amt = 1)
@@ -109,7 +112,7 @@
      * 
      * @param string $key The entry ID.
      * 
-     * @return string The cache entry name.
+     * @return void Never caches, so never has a key.
      * 
      */
     public function entry($key)




More information about the Solar-svn mailing list