cache

package
v2.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const (
	PROVIDER_GO_CACHE = gocache.AppName
	PROVIDER_REDIS    = redis.AppName
)
View Source
const (
	AppName = "cache"
)

Variables

This section is empty.

Functions

func Get added in v2.0.8

func Get() *cache

Types

type Cache

type Cache interface {
	Set(ctx context.Context, key string, value any, options ...SetOption) error
	IncrBy(ctx context.Context, key string, value int64) (int64, error)
	Get(ctx context.Context, key string, value any) error
	Exist(ctx context.Context, key string) error
	Del(ctx context.Context, keys ...string) error
}

func C

func C() Cache

type PROVIDER

type PROVIDER string

type SetOption

type SetOption func(*options)

func WithExpiration

func WithExpiration(expiration int64) SetOption

Jump to

Keyboard shortcuts

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