Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Cache] fix expiration handling in ArrayAdapter #18629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Apr 24, 2016

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

@@ -137,6 +137,8 @@ public function save(CacheItemInterface $item)
$expiry = $item[CacheItem::CAST_PREFIX.'expiry'];

if (null !== $expiry && $expiry <= time()) {
$this->expiries[$key] = $expiry;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unset($this->values[$key], $this->expiries[$key]);?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or return $this->deleteItem($key);?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, fixed

@xabbuh xabbuh force-pushed the array-adapter-expiration branch from e933498 to 8b0d990 Compare April 24, 2016 17:31
@nicolas-grekas
Copy link
Member

👍

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 8b0d990 into symfony:master Apr 25, 2016
nicolas-grekas added a commit that referenced this pull request Apr 25, 2016
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
@xabbuh xabbuh deleted the array-adapter-expiration branch April 25, 2016 06:51
@fabpot fabpot mentioned this pull request May 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants