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

feat: sqlc add SetCacheWithExpire method #3249

Merged
merged 1 commit into from
May 28, 2023

Conversation

lhcGinv
Copy link
Contributor

@lhcGinv lhcGinv commented May 15, 2023

add expiration time for redis #2431

@kevwan
Copy link
Contributor

kevwan commented May 15, 2023

Just delete the cache if it's invalid. What's the scenario to set expire value?

@lhcGinv
Copy link
Contributor Author

lhcGinv commented May 16, 2023

Just delete the cache if it's invalid. What's the scenario to set expire value?

Some special application scenarios require manual setting of expiration, such as the jwt cache when logging in and selecting 'remember me', which requires setting a different expiration. Or the login validity period may vary for different login types or roles of users.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #3249 (e7e0476) into master (2f2ddd3) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted Files Coverage Δ
core/stores/sqlc/cachedsql.go 93.26% <0.00%> (-3.74%) ⬇️

... and 1 file with indirect coverage changes

@kevwan
Copy link
Contributor

kevwan commented May 28, 2023

fix #2431

@kevwan kevwan merged commit 3726851 into zeromicro:master May 28, 2023
5 of 7 checks passed
wuyazi pushed a commit to wuyazi/go-zero that referenced this pull request Jun 14, 2023
Co-authored-by: luohancai <luohancai@taqu.cn>
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.

None yet

2 participants