function DatabaseBackend::doInvalidateMultiple
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Cache/DatabaseBackend.php \Drupal\Core\Cache\DatabaseBackend::doInvalidateMultiple()
Marks items in the cache bin table as invalid.
Parameters
string[] $cids: An array of normalized cache IDs.
1 call to DatabaseBackend::doInvalidateMultiple()
- DatabaseBackend::invalidateMultiple in core/
lib/ Drupal/ Core/ Cache/ DatabaseBackend.php - Marks cache items as invalid.
File
-
core/
lib/ Drupal/ Core/ Cache/ DatabaseBackend.php, line 382
Class
- DatabaseBackend
- Defines a default cache implementation.
Namespace
Drupal\Core\CacheCode
protected function doInvalidateMultiple(array $cids) : void {
// Update the items in groups of 1000. This keeps each query small.
$requestTime = $this->time
->getRequestTime();
foreach (array_chunk($cids, 1000) as $cids_chunk) {
$this->connection
->update($this->bin)
->fields([
'expire' => $requestTime - 1,
])
->condition('cid', $cids_chunk, 'IN')
->execute();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.