You are here

public function ChainedFastRawBackend::deleteMultiple in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/ChainedFastRawBackend.php \Drupal\supercache\Cache\ChainedFastRawBackend::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/ChainedFastRawBackend.php, line 207
Contains \Drupal\supercache\Cache\ChainedFastRawBackend.

Class

ChainedFastRawBackend
Defines a backend with a fast and a consistent backend chain.

Namespace

Drupal\supercache\Cache

Code

public function deleteMultiple(array $cids) {
  $this->consistentBackend
    ->deleteMultiple($cids);
  $this->fastBackend
    ->deleteMultiple($cids);
  $this
    ->markAsOutdated();
}