From 24146181c60ea9f83d802d09b149f2c725763c90 Mon Sep 17 00:00:00 2001 From: LOIC ROSSET ltd Date: Thu, 29 Aug 2013 20:13:58 +0100 Subject: [PATCH] Add APCu support --- classes/cache/CacheApc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/cache/CacheApc.php b/classes/cache/CacheApc.php index e32c04ad6..ae84e3144 100644 --- a/classes/cache/CacheApc.php +++ b/classes/cache/CacheApc.php @@ -34,9 +34,12 @@ class CacheApcCore extends Cache public function __construct() { $this->keys = array(); - $cache_info = apc_cache_info('user'); + $cache_info = apc_cache_info( ( extension_loaded('apcu') === true ) ? '' : 'user' ); foreach ($cache_info['cache_list'] as $entry) - $this->keys[$entry['info']] = $entry['ttl']; + if ( extension_loaded('apcu') === true ) + $this->keys[$entry['key']] = $entry['ttl']; + else + $this->keys[$entry['info']] = $entry['ttl']; } /**