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

[RedisCache] Add staleTTL option to normal get and set #50

Open
rohit-gohri opened this issue May 13, 2019 · 1 comment
Open

[RedisCache] Add staleTTL option to normal get and set #50

rohit-gohri opened this issue May 13, 2019 · 1 comment

Comments

@rohit-gohri
Copy link
Contributor

staleTTL is only an option for getOrSet. Should also be available to set function

@hit12369
Copy link
Member

hit12369 commented May 14, 2019

staleTTL is only an option for getOrSet. Should also be available to set function

Why is staleTTL needed in set and get?

get: Doesn't need it because the whole purpose of staleTTL is to generate value in background, if we don't have a set, having stateTTL is not gonna help.
set: staleTTL is not actually saved anywhere and checked by checking the createdAt of the value, so values created by set can be used with staleTTL in getOrSet.

Maybe I'm missing some scenario, an example is needed in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants