-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
I hope to provide a method: get the value but not update the expiration time #57
Comments
If you are busy, I can do it。 |
Same. go-cache can get a value without updating the exp time, but it cannot be set to update after each access. I need the two features both. |
Hello all. I also need the function that the value is forced to be deleted after timeout. func (table *CacheTable) Add(key interface{}, lifeSpan time.Duration, data interface{}) *CacheItem {
func (table *CacheTable) AddWithTTL(key interface{}, ttl time.Duration, data interface{}) *CacheItem { |
Ok, for the first time we can flush the complete cache. => as a work-a-round var internalCache *cache2go.CacheTable
func init() {
internalCache = cache2go.Cache("internalCache")
go func() {
for {
time.Sleep(1 * time.Minute)
internalCache.Flush()
}
}()
} |
@sirodeneko @dreamblack86 Happy to review a PR for this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hope to provide a method: get the value but not update the expiration time
The text was updated successfully, but these errors were encountered: