From: Michael M Slusarz Date: Tue, 16 Nov 2010 17:55:21 +0000 (-0700) Subject: Prefix is no longer a global parameter; it is driver specific X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3b5ebd3b0344b1ab24a9adb95f82a3dcc90d89e1;p=horde.git Prefix is no longer a global parameter; it is driver specific --- diff --git a/framework/Cache/lib/Horde/Cache/Storage/Apc.php b/framework/Cache/lib/Horde/Cache/Storage/Apc.php index 832a8fdce..f0b7c1351 100644 --- a/framework/Cache/lib/Horde/Cache/Storage/Apc.php +++ b/framework/Cache/lib/Horde/Cache/Storage/Apc.php @@ -15,6 +15,22 @@ class Horde_Cache_Storage_Apc extends Horde_Cache_Storage_Base { /** + * Constructor. + * + * @param array $params Optional parameters: + *
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
+     * 
+ */ + public function __construct(array $params = array()) + { + parent::__construct(array_merge(array( + 'prefix' => '', + ), $params)); + } + + /** */ public function get($key, $lifetime) { diff --git a/framework/Cache/lib/Horde/Cache/Storage/Eaccelerator.php b/framework/Cache/lib/Horde/Cache/Storage/Eaccelerator.php index 7575ef765..349b152eb 100644 --- a/framework/Cache/lib/Horde/Cache/Storage/Eaccelerator.php +++ b/framework/Cache/lib/Horde/Cache/Storage/Eaccelerator.php @@ -15,6 +15,14 @@ class Horde_Cache_Storage_Eaccelerator extends Horde_Cache_Storage_Base { /** + * Constructor. + * + * @param array $params Optional parameters: + *
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
+     * 
+ * * @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)); } /** diff --git a/framework/Cache/lib/Horde/Cache/Storage/Memcache.php b/framework/Cache/lib/Horde/Cache/Storage/Memcache.php index cb8f7fcd2..c10aa715f 100644 --- a/framework/Cache/lib/Horde/Cache/Storage/Memcache.php +++ b/framework/Cache/lib/Horde/Cache/Storage/Memcache.php @@ -37,12 +37,14 @@ class Horde_Cache_Storage_Memcache extends Horde_Cache_Storage_Base implements S * * @param array $params Parameter array: *
-     * '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: ''
      * 
* * @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)); } /** diff --git a/framework/Cache/lib/Horde/Cache/Storage/Xcache.php b/framework/Cache/lib/Horde/Cache/Storage/Xcache.php index 478946977..6f969d19b 100644 --- a/framework/Cache/lib/Horde/Cache/Storage/Xcache.php +++ b/framework/Cache/lib/Horde/Cache/Storage/Xcache.php @@ -15,6 +15,22 @@ class Horde_Cache_Storage_Xcache extends Horde_Cache_Storage_Base { /** + * Constructor. + * + * @param array $params Optional parameters: + *
+     * 'prefix' - (string) The prefix to use for the cache keys.
+     *            DEFAULT: ''
+     * 
+ */ + public function __construct(array $params = array()) + { + parent::__construct(array_merge(array( + 'prefix' => '', + ), $params)); + } + + /** */ public function get($key, $lifetime) {