cache

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 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 BigCache

type BigCache struct {
	Cache *bigcache.BigCache
}

func NewBigCache

func NewBigCache(allKeysExpTime time.Duration) (*BigCache, error)

func (*BigCache) Get

func (s *BigCache) Get(key string) ([]byte, error)

func (*BigCache) Set

func (s *BigCache) Set(key string, entry []byte) (err error)

type Cache

type Cache struct {
	Cache ICache
}

func NewLocalCache

func NewLocalCache(allKeysExpTime time.Duration) (*Cache, error)

type ICache

type ICache interface {
	Set(key string, entry []byte) error

	Get(key string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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