Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultCacheSize = 1024 DefaultCacheItemTTL = 60000000000 // 1 minute in nanoseconds )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { // The maximum size of the cache. MaxCacheSize int // The time-to-live for cache entries in nanoseconds. CacheEntryTTL time.Duration // contains filtered or unexported fields }
Cache is a basic thread-safe in-memory LRU cache. It is thread-safe and is used as the default items if providers
Click to show internal directories.
Click to hide internal directories.