1
0
mirror of synced 2025-01-31 12:32:59 +03:00

#1169 DDC-3343 - eagerly evicting cache if a persister passes a delete operation down to the DB

This commit is contained in:
Marco Pivetta 2015-01-27 09:04:28 +01:00
parent a9671fdc2e
commit c7a6352b08

View File

@ -103,7 +103,9 @@ class ReadWriteCachedEntityPersister extends AbstractEntityPersister
$key = new EntityCacheKey($this->class->rootEntityName, $this->uow->getEntityIdentifier($entity));
$lock = $this->region->lock($key);
$this->persister->delete($entity);
if ($this->persister->delete($entity)) {
$this->region->evict($key);
}
if ($lock === null) {
return;