cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(key string, value any) error
	Get(key string) (any, error)
	Del(key string) error
}

func GetCache

func GetCache() Cache

type InMemoryCache

type InMemoryCache struct {
	// contains filtered or unexported fields
}

func NewInMemoryCache

func NewInMemoryCache() *InMemoryCache

func (*InMemoryCache) Del

func (c *InMemoryCache) Del(key string) error

func (*InMemoryCache) Get

func (c *InMemoryCache) Get(key string) (any, error)

func (*InMemoryCache) Set

func (c *InMemoryCache) Set(key string, value any) error

Jump to

Keyboard shortcuts

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