Prefix is no longer a global parameter; it is driver specific
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Nov 2010 17:55:21 +0000 (10:55 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 16 Nov 2010 17:55:26 +0000 (10:55 -0700)
framework/Cache/lib/Horde/Cache/Storage/Apc.php
framework/Cache/lib/Horde/Cache/Storage/Eaccelerator.php
framework/Cache/lib/Horde/Cache/Storage/Memcache.php
framework/Cache/lib/Horde/Cache/Storage/Xcache.php

index 832a8fd..f0b7c13 100644 (file)
 class Horde_Cache_Storage_Apc extends Horde_Cache_Storage_Base
 {
     /**
+     * Constructor.
+     *
+     * @param array $params  Optional parameters:
+     * <pre>
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
+     * </pre>
+     */
+    public function __construct(array $params = array())
+    {
+        parent::__construct(array_merge(array(
+            'prefix' => '',
+        ), $params));
+    }
+
+    /**
      */
     public function get($key, $lifetime)
     {
index 7575ef7..349b152 100644 (file)
 class Horde_Cache_Storage_Eaccelerator extends Horde_Cache_Storage_Base
 {
     /**
+     * Constructor.
+     *
+     * @param array $params  Optional parameters:
+     * <pre>
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
+     * </pre>
+     *
      * @throws Horde_Cache_Exception
      */
     public function __construct(array $params = array())
@@ -23,7 +31,9 @@ class Horde_Cache_Storage_Eaccelerator extends Horde_Cache_Storage_Base
             throw new Horde_Cache_Exception('eAccelerator must be compiled with support for shared memory to use as caching backend.');
         }
 
-        parent::__construct($params);
+        parent::__construct(array_merge(array(
+            'prefix' => '',
+        ), $params));
     }
 
     /**
index cb8f7fc..c10aa71 100644 (file)
@@ -37,12 +37,14 @@ class Horde_Cache_Storage_Memcache extends Horde_Cache_Storage_Base implements S
      *
      * @param array $params  Parameter array:
      * <pre>
-     * 'memcache' - (Horde_Memcache) A Horde_Memcache object.
+     * 'memcache' - (Horde_Memcache) [REQUIRED] A Horde_Memcache object.
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
      * </pre>
      *
      * @throws InvalidArgumentException
      */
-    public function __construct($params = array())
+    public function __construct(array $params = array())
     {
         if (!isset($params['memcache'])) {
             throw new InvalidArgumentException('Missing memcache object');
@@ -51,7 +53,9 @@ class Horde_Cache_Storage_Memcache extends Horde_Cache_Storage_Base implements S
         $this->_memcache = $params['memcache'];
         unset($params['memcache']);
 
-        parent::__construct($params);
+        parent::__construct(array_merge(array(
+            'prefix' => '',
+        ), $params));
     }
 
     /**
index 4789469..6f969d1 100644 (file)
 class Horde_Cache_Storage_Xcache extends Horde_Cache_Storage_Base
 {
     /**
+     * Constructor.
+     *
+     * @param array $params  Optional parameters:
+     * <pre>
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
+     * </pre>
+     */
+    public function __construct(array $params = array())
+    {
+        parent::__construct(array_merge(array(
+            'prefix' => '',
+        ), $params));
+    }
+
+    /**
      */
     public function get($key, $lifetime)
     {