inmem_cache

package
v0.0.0-...-8122643 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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]) Get

func (c *InmemCache[T]) Get(key string, value *T) (bool, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL