Improve collection reference caching and remove legacy maps

This commit is contained in:
Thibaud Fabre
2015-07-10 18:39:36 +02:00
parent fcb369486a
commit d8f498aa26
12 changed files with 238 additions and 68 deletions

View File

@@ -96,6 +96,15 @@ final class CachedCollectionRepository implements CollectionRepository
$this->cache->delete($cacheKey);
}
public function delete(Collection $collection)
{
$this->repository->delete($collection);
$cacheKey = hash('sha256', $this->cacheKey);
$this->cache->delete($cacheKey);
}
private function putInCache($key, $value)
{
$this->cache->save($key, $value);