Commit 0ba5c182 authored by Andreas Fischer's avatar Andreas Fischer
Browse files

HHVM: In APC cache clear, only request the cache key in APCIterator.

The default value of the $format parameter of the APCIterator constructur is
APC_ITER_ALL which instructs the iterator to provide all available information
on cache values being iterated over. Only the key value is necessary for
matching and deletion via apc_delete(), though.

This prevents a "Format values FILENAME, DEVICE, INODE, MD5, NUM_HITS, MTIME,
CTIME, DTIME, ATIME, REFCOUNT not supported yet." notice on HHVM.
parent 3036a871
......@@ -32,7 +32,7 @@ class APC extends Cache {
public function clear($prefix = '') {
$ns = $this->getPrefix() . $prefix;
$ns = preg_quote($ns, '/');
$iter = new \APCIterator('user', '/^' . $ns . '/');
$iter = new \APCIterator('user', '/^' . $ns . '/', APC_ITER_KEY);
return apc_delete($iter);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment