You are here

public function MemcacheBackend::invalidateMultiple in Memcache API and Integration 8.2

Marks cache items as invalid.

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

Parameters

array $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 src/MemcacheBackend.php
Marks a cache item as invalid.

File

src/MemcacheBackend.php, line 362

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);
    }
  }
}