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

Using maxAge does not check for item's age. It checks for last access time. #45

Closed
tmarciszewski opened this issue Apr 21, 2015 · 2 comments

Comments

@tmarciszewski
Copy link

I'm not sure if this is intended behaviour. Up to version 2.5.0 setting maxAge caused removal of item from cache after maxAge milliseconds. At the moment the check is not made against total age of item but against its last access date.

This means that cached item can be stored indefinately if they are accessed often. Item will be removed only if it's accessed after time greater than maxAge.

Is this intended behaviour? If it is it should be made clear in the documentation.

@isaacs
Copy link
Owner

isaacs commented Apr 24, 2015

Oh, no, you're right. That's a mistake. At least, it was a breaking change that I didn't notice. My apologies. I'll fix on 2.6.2.

@isaacs isaacs closed this as completed Apr 24, 2015
@tmarciszewski
Copy link
Author

That's great. Thanks.

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

No branches or pull requests

2 participants