Documentation ¶
Index ¶
- type InmemCache
- func (c *InmemCache[T]) Clear() error
- func (c *InmemCache[T]) Get(key string, value *T) (bool, error)
- func (c *InmemCache[T]) GetUnset(key string, value *T) (bool, error)
- func (c *InmemCache[T]) Keys() ([]string, error)
- func (c *InmemCache[T]) Set(key string, value T, ttlSeconds ...int) error
- func (c *InmemCache[T]) Start()
- func (c *InmemCache[T]) Stop()
- func (c *InmemCache[T]) Touch(key string) error
- func (c *InmemCache[T]) Unset(key string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InmemCache ¶
type InmemCache[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]() *InmemCache[T]
func (*InmemCache[T]) Clear ¶
func (c *InmemCache[T]) Clear() error
func (*InmemCache[T]) GetUnset ¶
func (c *InmemCache[T]) GetUnset(key string, value *T) (bool, error)
func (*InmemCache[T]) Keys ¶
func (c *InmemCache[T]) Keys() ([]string, error)
func (*InmemCache[T]) Set ¶
func (c *InmemCache[T]) Set(key string, value T, ttlSeconds ...int) error
func (*InmemCache[T]) Start ¶
func (c *InmemCache[T]) Start()
func (*InmemCache[T]) Stop ¶
func (c *InmemCache[T]) Stop()
func (*InmemCache[T]) Touch ¶
func (c *InmemCache[T]) Touch(key string) error
func (*InmemCache[T]) Unset ¶
func (c *InmemCache[T]) Unset(key string) error
Click to show internal directories.
Click to hide internal directories.