Overrides Drupal\Core\Entity\DataBaseStorageController::preSave().
Overrides DatabaseStorageController::preSave
protected function preSave(EntityInterface $entity) {
parent::preSave($entity);
// Invalidate the block cache to update aggregator feed-based derivatives.
if (module_exists('block')) {
drupal_container()
->get('plugin.manager.block')
->clearCachedDefinitions();
}
// An existing feed is being modified, delete the category listings.
db_delete('aggregator_category_feed')
->condition('fid', $entity
->id())
->execute();
}