jellydator / ttlcache

An in-memory cache with item expiration and generics
MIT License
883 stars 115 forks source link

How to get cache value without "Automatic expiration time extension"? #98

Closed davidzwxu closed 1 year ago

davidzwxu commented 1 year ago

When i use cache.Get("key"), the item will automatic expiration, but i don't need this behavior, i want to get the expireAt time from the "key" is set

swithek commented 1 year ago

You can use WithDisableTouchOnHit to achieve this.