Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }
Cache manages the caching of items based on keys with expiration time for cached items.
func NewCache ¶
func NewCache[K comparable, V any](expiration time.Duration) *Cache[K, V]
NewCache creates a new Cache instance with a specified expiration time.
Click to show internal directories.
Click to hide internal directories.