mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
Improve collection reference caching and remove legacy maps
This commit is contained in:
@@ -54,7 +54,16 @@ class ArrayCacheCollectionRepository implements CollectionRepository
|
||||
$this->collectionRepository->save($collection);
|
||||
|
||||
if ($this->collectionCache !== null) {
|
||||
$this->collectionCache = null;
|
||||
$this->collectionCache[$collection->getCollectionId()] = $collection;
|
||||
}
|
||||
}
|
||||
|
||||
public function delete(Collection $collection)
|
||||
{
|
||||
$this->collectionRepository->delete($collection);
|
||||
|
||||
if (isset($this->collectionCache[$collection->getCollectionId()])) {
|
||||
unset($this->collectionCache[$collection->getCollectionId()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user