Skip to content
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

[5.3] Cache: fix file store extending cache expiration time #15164

Merged
merged 1 commit into from
Aug 31, 2016

Conversation

zoltanpeto
Copy link
Contributor

Problem: When incrementing a cached value which expires in less than a minute, the expiration time is extended to a full minute. This mainly causes problems when using API rate limiter with file cache driver, see #15152.

Solution: don't round up the remaining number of minutes when retrieving cache payload, cast calculated seconds to int in expiration() instead.

Other cache drivers don't seem to have this problem.

@zoltanpeto zoltanpeto changed the title Cache: fix file store extending cache expiration time [5.3] Cache: fix file store extending cache expiration time Aug 30, 2016
@zoltanpeto
Copy link
Contributor Author

I'm wondering if this could be merged into 5.1/5.2 also, I don't think it would be a breaking change - I only based this case on 5.3 because @GrahamCampbell advised me to in #15152. Thoughts?

@taylorotwell
Copy link
Member

I suggest not using file cache in a production scenario really.

@taylorotwell taylorotwell reopened this Aug 31, 2016
@taylorotwell taylorotwell merged commit d74b751 into laravel:5.3 Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants