function DatabaseBackend::invalidateMultiple
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::invalidateMultiple()
- 10 core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::invalidateMultiple()
- 9 core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::invalidateMultiple()
- 8.9.x core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::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
1 call to DatabaseBackend::invalidateMultiple()
- DatabaseBackend::invalidate in core/
lib/ Drupal/ Core/ Cache/ DatabaseBackend.php - Marks a cache item as invalid.
File
-
core/
lib/ Drupal/ Core/ Cache/ DatabaseBackend.php, line 361
Class
- DatabaseBackend
- Defines a default cache implementation.
Namespace
Drupal\Core\CacheCode
public function invalidateMultiple(array $cids) {
$cids = array_values(array_map([
$this,
'normalizeCid',
], $cids));
try {
$this->doInvalidateMultiple($cids);
} catch (\Exception) {
// If the table is missing, there are no items to invalidate. If the
// table is there, it is possible that another process made it after the
// query failed. In this condition, do the query again.
if ($this->connection
->schema()
->tableExists($this->bin)) {
$this->doInvalidateMultiple($cids);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.