You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flush function in Phalcon\Cache\Backend\Apc removes all elements in apc even if there are items with a different prefix.
Phalcon Code :
for item in iterator(new \APCIterator("user")) {
apc_delete(item["key"]);
}
It would be nice if a single instance of the cache removes only it's own keys by prefix or at least if there was an optional parameter prefix that select the elements with that prefix and removes only those.
Possible usage of the prefix variable
public function flush() -> boolean
{
var item, prefixPattern;
let prefixPattern = "/^_PHCA" . this->_prefix . "/";
for item in iterator(new \APCIterator("user", prefixPattern)) {
apc_delete(item["key"]);
}
return true;
}
The text was updated successfully, but these errors were encountered:
The flush function in Phalcon\Cache\Backend\Apc removes all elements in apc even if there are items with a different prefix.
Phalcon Code :
It would be nice if a single instance of the cache removes only it's own keys by prefix or at least if there was an optional parameter prefix that select the elements with that prefix and removes only those.
Possible usage of the prefix variable
The text was updated successfully, but these errors were encountered: