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

delete entries from the cache when the TTL expires #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marten-seemann
Copy link
Contributor

@marten-seemann marten-seemann commented Jun 6, 2021

Instead of saving the TTL value (an integer, measuring the time in seconds), we now save the expiry timestamp for every response we receive. A "cleanup" go routine then goes through our cache every 10s and removes entries that have expired.

@marten-seemann marten-seemann force-pushed the cleanup-after-ttl branch 2 times, most recently from 5877433 to 2ce249b Compare June 14, 2021 01:52
@marten-seemann
Copy link
Contributor Author

@grandcat Friendly ping. Could I get a review of this PR?

@grandcat
Copy link
Owner

grandcat commented Jul 5, 2021

Could you rebase this PR on latest master, please?

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