Closed BaiZe1998 closed 9 months ago
desc:If a large object remains in memory after a set, does it cause the set memory limit to be exceeded all the time. Is it better to eliminate it by for loop?
https://github.com/jellydator/ttlcache/blob/v3/cache.go#L148
if c.options.capacity != 0 && uint64(len(c.items.values)) >= c.options.capacity { // delete the oldest item c.evict(EvictionReasonCapacityReached, c.items.lru.Back()) }
Can you explain what you're trying to achieve? An example would help too.
desc:If a large object remains in memory after a set, does it cause the set memory limit to be exceeded all the time. Is it better to eliminate it by for loop?
https://github.com/jellydator/ttlcache/blob/v3/cache.go#L148