bigcache
bigcache copied to clipboard
What is the recommended way to have cache never expire?
Sorry if this is addressed elsewhere, I couldn't seem to find a definite answer. LifeWindow 0 and CleanWindow 0 perhaps? Thanks!
https://github.com/allegro/bigcache/blob/c2b72fe951a1ff765a0e58184738476f2fd71bb1/config.go#L11-L13 CleanWindow 0 should do the trick but if you run out of memory then entries will be deleted
i also want to have cache never expire. in my case, i will refresh some keys regularly, but it would run out of memory, it due to the old value of these keys are not be deleted. i check the del/set func in BigCache, and it just remove the index. the old values only delete after expiration, does BigCache will support other delete strategy in the future?(like delete directly, no need to wait after expiration)