From 8b0d990a0c5d6fd4839408d996aee1c27514e765 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 24 Apr 2016 15:07:58 +0200 Subject: [PATCH] [Cache] fix expiration handling in ArrayAdapter --- src/Symfony/Component/Cache/Adapter/ArrayAdapter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php index 61e2374aa0f1..6e55452536b7 100644 --- a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php @@ -137,6 +137,8 @@ public function save(CacheItemInterface $item) $expiry = $item[CacheItem::CAST_PREFIX.'expiry']; if (null !== $expiry && $expiry <= time()) { + $this->deleteItem($key); + return true; } if ($this->storeSerialized) {