-
Notifications
You must be signed in to change notification settings - Fork 0
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
move cache TTLs to a struct #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this solves half of the problem. There are two parts to it:
- We should only have one struct with all of the TTL information. You have done this here 🤗
- 2nd part is about associating those TTLs with the respective functions such as
cacheconfig.IsBlocksRootDir
and so on.
But, I think that this is going in the wrong direction.
The 1st/2nd part is already kind of done but we are only doing it in CachingBucketConfig
; the new groupcache Getter function reimplements the same matching, right? Perhaps CachingBucketConfig
could accept a nil cache.Cache
and expose those functions like findGetConfig
and so on. Then we could use them inside the getter function. What do you think?
Signed-off-by: akanshat <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 💪 just some suggestions
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo minor nits 👍 thank you for this amazing work
Signed-off-by: akanshat <[email protected]>
Signed-off-by: akanshat [email protected]
Changes
Verification