Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[E any] struct { // contains filtered or unexported fields }
Cache is an in-memory cache. Each key-value pair stored in this cache have a TTL and one goroutine removes the
key-value pair form the cache which is older than TTL time.
func New ¶
New method initiates the cache object. To initiate, this sets certain properties of the cache like keyTTL, cleanupFreq, size, empty cacheMap
Click to show internal directories.
Click to hide internal directories.