Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidKey = fmt.Errorf("key not found")
)
Errors raised by package mimaps.
Functions ¶
This section is empty.
Types ¶
type InMemoryCache ¶
type InMemoryCache[K comparable, V any] struct { // contains filtered or unexported fields }
func NewInMemoryCache ¶
func NewInMemoryCache[K comparable, V any](expire int64) InMemoryCache[K, V]
func (*InMemoryCache[K, V]) Delete ¶
func (e *InMemoryCache[K, V]) Delete(key K) error
func (*InMemoryCache[K, V]) Get ¶
func (e *InMemoryCache[K, V]) Get(key K) (V, error)
func (*InMemoryCache[K, V]) Put ¶
func (e *InMemoryCache[K, V]) Put(key K, value V) error
Click to show internal directories.
Click to hide internal directories.