Add APCu support

This commit is contained in:
LOIC ROSSET ltd committed 2013-08-29 20:13:58 +01:00
1 parent e6abe1c5a0
commit 24146181c6
1 file changed
+5 -2
+5 -2
View File
@@ -34,9 +34,12 @@ class CacheApcCore extends Cache
public function __construct() public function __construct()
{ {
$this->keys = array(); $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) 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'];
} }
/** /**