From 0a5477ea0d7974c7492d4ac55ec870e5f2de0d25 Mon Sep 17 00:00:00 2001 From: Julien Tant Date: Tue, 5 Jan 2016 09:15:57 +0100 Subject: [PATCH] Cache decorator was not caching individual blocks The cache key didn't contain an identifier, so always the first cached element was returned. --- Repositories/Cache/CacheBlockDecorator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Repositories/Cache/CacheBlockDecorator.php b/Repositories/Cache/CacheBlockDecorator.php index 576b51b..0a58a55 100644 --- a/Repositories/Cache/CacheBlockDecorator.php +++ b/Repositories/Cache/CacheBlockDecorator.php @@ -37,7 +37,7 @@ public function get($name) { return $this->cache ->tags($this->entityName, 'global') - ->remember("{$this->locale}.{$this->entityName}.get", $this->cacheTime, + ->remember("{$this->locale}.{$this->entityName}.get.{$name}", $this->cacheTime, function () use ($name) { return $this->repository->get($name); }