cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ExpireRangeMin is the minimum expire time
	ExpireRangeMin = 40 * time.Minute
	// ExpireRangeMax is the maximum expire time
	ExpireRangeMax = 60 * time.Minute
)

Functions

This section is empty.

Types

type RedisCache

type RedisCache struct {
	*redis.Client
	// contains filtered or unexported fields
}

RedisCache is a redis cache

func CreateRedisCache

func CreateRedisCache(logger *zap.Logger, client *redis.Client) *RedisCache

CreateRedisCache creates a redis cache

func (*RedisCache) DeleteCache

func (c *RedisCache) DeleteCache(key key.Key)

DeleteCache deletes cache

func (*RedisCache) GetCache

func (c *RedisCache) GetCache(key key.Key, doc any) bool

GetCache gets cache

func (*RedisCache) SetCache

func (c *RedisCache) SetCache(key key.Key, doc any)

SetCache sets cache

Jump to

Keyboard shortcuts

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