Documentation
¶
Index ¶
- type Cache
- func (c *Cache[T]) Clear()
- func (c *Cache[T]) Close()
- func (c *Cache[T]) Delete(key string)
- func (c *Cache[T]) Get(key string) (T, bool)
- func (c *Cache[T]) Len() int
- func (c *Cache[T]) Reap()
- func (c *Cache[T]) Set(key string, value T)
- func (c *Cache[T]) SetPermanent(key string, value T)
- func (c *Cache[T]) SetTTL(key string, value T, ttl time.Duration)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] struct { // contains filtered or unexported fields }
func (*Cache[T]) SetPermanent ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.