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

Add TTL to exists response cache #282

Merged
merged 2 commits into from Mar 16, 2022
Merged

Conversation

kakkoyun
Copy link
Member

Signed-off-by: Kemal Akkoyun kakkoyun@gmail.com

Fixes #275

Depends parca-dev/parca#767

@brancz
Copy link
Member

brancz commented Mar 16, 2022

Looks good, just for clarification though, these are LRU caches not time-based, right?

@kakkoyun
Copy link
Member Author

Looks good, just for clarification though, these are LRU caches not time-based, right?

Unless an option is given e. g. cache.WithExpireAfterAccess(2*time.Minute), they are size-based LRU caches.

https://pkg.go.dev/github.com/goburrow/cache#section-readme

I have changed the existing one that don't need time-based invalidation just to eliminate additional dependency.

@brancz
Copy link
Member

brancz commented Mar 16, 2022

Got it, and since we're not using that, these are "just" LRU caches. I was just thrown off by the title and commit.

Love it!

@kakkoyun kakkoyun marked this pull request as ready for review March 16, 2022 13:20
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun kakkoyun merged commit f1fc5a4 into parca-dev:main Mar 16, 2022
@kakkoyun kakkoyun deleted the ttl_cache branch March 16, 2022 14:40
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.

Time-based invalidation of debug information caches
2 participants