You are here

public function ApcuRawBackend::deleteMultiple in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/ApcuRawBackend.php \Drupal\supercache\Cache\ApcuRawBackend::deleteMultiple()

Deletes multiple items from the cache.

If the cache items are being deleted because they are no longer "fresh", you may consider using invalidateMultiple() instead. This allows callers to retrieve the invalid items by calling get() with $allow_invalid set to TRUE. In some cases an invalid item may be acceptable rather than having to rebuild the cache.

Parameters

array $cids: An array of cache IDs to delete.

Overrides CacheRawBackendInterface::deleteMultiple

See also

\Drupal\supercache\Cache\CacheRawBackendInterface::delete()

\Drupal\supercache\Cache\CacheRawBackendInterface::deleteAll()

File

src/Cache/ApcuRawBackend.php, line 209
Contains \Drupal\supercache\Cache\ApcuRawBackend.

Class

ApcuRawBackend
Stores cache items in the Alternative PHP Cache User Cache (APCu).

Namespace

Drupal\supercache\Cache

Code

public function deleteMultiple(array $cids) {
  apcu_delete(array_map(array(
    $this,
    'getApcuKey',
  ), $cids));
}