cache

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 7 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(ctx context.Context, key string, value interface{}, ttl time.Duration) error
	Get(ctx context.Context, key string, data interface{}) error
	Delete(ctx context.Context, key string) error
}

func NewCache

func NewCache() (Cache, error)

type RedisCache

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

func (*RedisCache) Delete

func (r *RedisCache) Delete(ctx context.Context, key string) error

func (*RedisCache) Get

func (r *RedisCache) Get(ctx context.Context, key string, data interface{}) error

func (*RedisCache) Set

func (r *RedisCache) Set(ctx context.Context, key string, data interface{}, ttl time.Duration) error

Jump to

Keyboard shortcuts

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