cache

package
v0.39.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	cache.Cache

	// SetNoExpireCtx Because zero cache set ctx has default expire, so jzero add this method
	SetNoExpireCtx(ctx context.Context, key string, val any) error

	// GetPrefixKeysCtx get prefix key, give prefix key return all matched key
	GetPrefixKeysCtx(ctx context.Context, prefix string) ([]string, error)

	// ExpireCtx set key expire
	ExpireCtx(ctx context.Context, key string, expire time.Duration) error
}

func NewRedisNode

func NewRedisNode(rds *redis.Redis, errNotFound error, opts ...zerocache.Option) Cache

func NewSyncMap

func NewSyncMap(errNotFound error) Cache

NewSyncMap creates an instance of SyncMap cache driver

Jump to

Keyboard shortcuts

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