driver

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory added in v0.5.0

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

Memory 内存驱动

func NewMemoryCache

func NewMemoryCache() *Memory

func (*Memory) Delete added in v0.5.0

func (m *Memory) Delete(_ context.Context, key string) error

func (*Memory) Exists added in v0.5.0

func (m *Memory) Exists(_ context.Context, key string) (bool, error)

func (*Memory) Get added in v0.5.0

func (m *Memory) Get(_ context.Context, key string) ([]byte, error)

func (*Memory) Incr added in v0.5.0

func (m *Memory) Incr(_ context.Context, key string) (int64, error)

func (*Memory) ScanDeleteByPrefix added in v0.5.0

func (m *Memory) ScanDeleteByPrefix(_ context.Context, prefix string) error

func (*Memory) Set added in v0.5.0

func (m *Memory) Set(_ context.Context, key string, val []byte, ttl time.Duration) error

type Redis added in v0.5.0

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

Redis redis驱动

func NewRedisCache

func NewRedisCache() *Redis

func (*Redis) Delete added in v0.5.0

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

func (*Redis) Exists added in v0.5.0

func (r *Redis) Exists(ctx context.Context, key string) (bool, error)

func (*Redis) Get added in v0.5.0

func (r *Redis) Get(ctx context.Context, key string) ([]byte, error)

func (*Redis) Incr added in v0.5.0

func (r *Redis) Incr(ctx context.Context, key string) (int64, error)

func (*Redis) ScanDeleteByPrefix added in v0.5.0

func (r *Redis) ScanDeleteByPrefix(ctx context.Context, prefix string) error

func (*Redis) Set added in v0.5.0

func (r *Redis) Set(ctx context.Context, key string, val []byte, ttl time.Duration) error

Jump to

Keyboard shortcuts

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