protected function CacheFragmentController::fastDelete in RESTful 7.2
Do a fast delete without loading entities of firing delete hooks.
Parameters
array $ids: An array of entity IDs.
\DatabaseTransaction $transaction: Optionally a DatabaseTransaction object to use. Allows overrides to pass in their transaction object.
Throws
\Exception When there is a database error.
1 call to CacheFragmentController::fastDelete()
- CacheFragmentController::delete in src/
RenderCache/ Entity/ CacheFragmentController.php
File
- src/
RenderCache/ Entity/ CacheFragmentController.php, line 167 - Contains \Drupal\restful\RenderCache\Entity\CacheFragmentController.
Class
- CacheFragmentController
- Class CacheFragmentController.
Namespace
Drupal\restful\RenderCache\EntityCode
protected function fastDelete($ids, \DatabaseTransaction $transaction = NULL) {
$transaction = isset($transaction) ? $transaction : db_transaction();
try {
db_delete($this::getTableName())
->condition($this::getTableIdkey(), $ids, 'IN')
->execute();
// Reset the cache as soon as the changes have been applied.
$this
->resetCache($ids);
// Ignore slave server temporarily.
db_ignore_slave();
} catch (\Exception $e) {
$transaction
->rollback();
watchdog_exception($this->entityType, $e);
throw $e;
}
}