Skip to content

Commit

Permalink
bug #18629 [Cache] fix expiration handling in ArrayAdapter (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] fix expiration handling in ArrayAdapter

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

8b0d990 [Cache] fix expiration handling in ArrayAdapter
  • Loading branch information
nicolas-grekas committed Apr 25, 2016
2 parents db208e3 + 8b0d990 commit 84b48de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Symfony/Component/Cache/Adapter/ArrayAdapter.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 84b48de

Please sign in to comment.