You are here

protected function DrupalAPCCache::deletePrefix in APC - Alternative PHP Cache 7

Delete CID matching the given prefix.

Parameters

string $prefix:

2 calls to DrupalAPCCache::deletePrefix()
DrupalAPCCache::clear in ./drupal_apc_cache.inc
Expires data from the cache.
DrupalAPCCache::flush in ./drupal_apc_cache.inc
Flush all cache items in a bin.

File

./drupal_apc_cache.inc, line 244
This integrates the drupal APC cache backend.

Class

DrupalAPCCache
APC cache implementation.

Code

protected function deletePrefix($prefix) {
  if (class_exists('APCIterator')) {
    $iterator = new APCIterator('user', '/^\\Q' . $this
      ->binKey() . $prefix . '\\E/', APC_ITER_KEY);
    foreach ($iterator as $key => $data) {
      apc_delete($key);
    }
  }
}