You are here

public function MemcacheBackend::invalidateMultiple in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 modules/memcache/src/MemcacheBackend.php \Drupal\memcache\MemcacheBackend::invalidateMultiple()

Marks cache items as invalid.

Invalid items may be returned in later calls to get(), if the $allow_invalid argument is TRUE.

Parameters

string $cids: An array of cache IDs to invalidate.

Overrides CacheBackendInterface::invalidateMultiple

See also

Drupal\Core\Cache\CacheBackendInterface::deleteMultiple()

Drupal\Core\Cache\CacheBackendInterface::invalidate()

Drupal\Core\Cache\CacheBackendInterface::invalidateTags()

Drupal\Core\Cache\CacheBackendInterface::invalidateAll()

1 call to MemcacheBackend::invalidateMultiple()
MemcacheBackend::invalidate in modules/memcache/src/MemcacheBackend.php
Marks a cache item as invalid.

File

modules/memcache/src/MemcacheBackend.php, line 251
Contains \Drupal\memcache\MemcacheBackend.

Class

MemcacheBackend
Defines a Memcache cache backend.

Namespace

Drupal\memcache

Code

public function invalidateMultiple(array $cids) {
  foreach ($cids as $cid) {
    if ($item = $this
      ->get($cid)) {
      $item->expire = REQUEST_TIME - 1;
      $this->memcache
        ->set($cid, $item);
    }
  }
}