cache

package
v0.0.0-...-d1e7c79 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 5 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 {
	Put(ctx context.Context, key, value string, expire time.Duration) error
	Get(ctx context.Context, key string) (string, error)
}

func NewRedisCache

func NewRedisCache(rdb *db.RedisDb) Cache

type RedisCache

type RedisCache struct {
	*db.RedisDb
}

func (*RedisCache) Get

func (rc *RedisCache) Get(ctx context.Context, key string) (string, error)

func (*RedisCache) Put

func (rc *RedisCache) Put(ctx context.Context, key, value string, expire time.Duration) error

Jump to

Keyboard shortcuts

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