cache

package
v0.0.0-...-a9153d3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMemCache

func DefaultMemCache() *cache.Cache

func DeleteCacheOf

func DeleteCacheOf(ctx context.Context, c Interface)

func GetCacheOf

func GetCacheOf(ctx context.Context, c Interface) error

func MemCache

func MemCache(defaultExpiration time.Duration, cleanupInterval time.Duration) *cache.Cache

func RedisCache

func RedisCache(addr string) *cache.Cache

func SetCacheOf

func SetCacheOf(ctx context.Context, c Interface)

func SetUp

func SetUp(caches ...cache.SetterCacheInterface)

Types

type CustomCacheValue

type CustomCacheValue interface {
	CacheValue() interface{}
}

CustomCacheValue 自定义缓存value

type Interface

type Interface interface {
	CacheKey() (cacheKeys []string)
	Option() *store.Options
}

Interface 缓存接口

Jump to

Keyboard shortcuts

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