diff options
Diffstat (limited to 'phpBB/phpbb/cache/driver/redis.php')
-rw-r--r-- | phpBB/phpbb/cache/driver/redis.php | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/phpBB/phpbb/cache/driver/redis.php b/phpBB/phpbb/cache/driver/redis.php index 960735b673..2f2a32a12d 100644 --- a/phpBB/phpbb/cache/driver/redis.php +++ b/phpBB/phpbb/cache/driver/redis.php @@ -7,13 +7,7 @@ * */ -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} +namespace phpbb\cache\driver; if (!defined('PHPBB_ACM_REDIS_PORT')) { @@ -33,7 +27,7 @@ if (!defined('PHPBB_ACM_REDIS_HOST')) * * @package acm */ -class phpbb_cache_driver_redis extends phpbb_cache_driver_memory +class redis extends \phpbb\cache\driver\memory { var $extension = 'redis'; @@ -56,7 +50,7 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory // Call the parent constructor parent::__construct(); - $this->redis = new Redis(); + $this->redis = new \Redis(); $args = func_get_args(); if (!empty($args)) @@ -83,8 +77,8 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory } } - $this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP); - $this->redis->setOption(Redis::OPT_PREFIX, $this->key_prefix); + $this->redis->setOption(\Redis::OPT_SERIALIZER, \Redis::SERIALIZER_PHP); + $this->redis->setOption(\Redis::OPT_PREFIX, $this->key_prefix); if (defined('PHPBB_ACM_REDIS_DB')) { @@ -98,9 +92,7 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory } /** - * Unload the cache resources - * - * @return null + * {@inheritDoc} */ function unload() { @@ -110,9 +102,7 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory } /** - * Purge cache data - * - * @return null + * {@inheritDoc} */ function purge() { @@ -163,4 +153,3 @@ class phpbb_cache_driver_redis extends phpbb_cache_driver_memory return false; } } - |