Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T comparable] struct { // contains filtered or unexported fields }
Cache is a simple generic datatype that caches key-value pairs.
func (*Cache[T]) Clear ¶
func (c *Cache[T]) Clear()
Clear removes all items from the cache, resetting it to an empty state.
func (Cache[T]) Get ¶
Get a value from the cache by its key. It returns the value and a boolean indicating if the key was found in the cache.
Click to show internal directories.
Click to hide internal directories.