agecache icon indicating copy to clipboard operation
agecache copied to clipboard

An LRU cache with support for max age

Results 5 agecache issues
Sort by recently updated
recently updated
newest added

Just playing around with how this would look if it used the new go generics. Of course you lose some functionality in the ability to store _anything_, but in some...

https://godoc.org/github.com/segmentio/agecache Here's the Go license policy: https://pkg.go.dev/license-policy Thank you!

This commit allows caches to be configured with an ExpireAfterType that controls how entries are expired from the cache; two types are supported. * ExpireAfterWrite specifies that each entry should...

Has(), Peek() does not take into consideration key expiration. That feels odd and expected. Any reason these are implemented this way? Thanks.

I came across this library, as I was searching for a LRU cache with timed eviction. I think it will be nice if you also add a `OnMiss(key interface{}) (interface{},...