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

GetOrSet doesn't update expManager #66

Open
reitowo opened this issue Feb 24, 2025 · 0 comments · May be fixed by #67
Open

GetOrSet doesn't update expManager #66

reitowo opened this issue Feb 24, 2025 · 0 comments · May be fixed by #67

Comments

@reitowo
Copy link

reitowo commented Feb 24, 2025

go-generics-cache/cache.go

Lines 235 to 245 in f567a86

if !ok || item.Expired() {
item := newItem(key, val, opts...)
c.cache.Set(key, item)
return val, false
}
return item.Value, true
}
// DeleteExpired all expired items from the cache.

GetOrSet doesn't respect expire setting and will not be removed even expired.

@reitowo reitowo linked a pull request Feb 24, 2025 that will close this issue
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 a pull request may close this issue.

1 participant