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

PersistentStorage#get expires stale data #34

Merged
merged 1 commit into from
Feb 23, 2013

Conversation

svanderbleek
Copy link
Contributor

The TTL wasn't being used correctly in get, the behavior should be to remove keys where the TTL is stale. Added test coverage for isExpired and a case in clean with a TTL value, previously the test would fail if a TTL value was used because clean only reduced index by -1 but two indexes could be removed. The new implementation delays the removal outside the loop which I think is cleaner and avoids index change conditions.

@jharding
Copy link
Contributor

Looks good. This will go out in v0.8.1. Thanks a lot for the pull request.

@jharding jharding merged commit 0f023b0 into twitter:integration-0.8.1 Feb 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants