redis

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorType = fmt.Errorf("type error")

Functions

This section is empty.

Types

type ByteCache

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

ByteCache is a Redis-backed cache implementation for storing raw byte data. It provides direct access to Redis operations without any encoding/decoding overhead.

func NewByteCache

func NewByteCache(client *redis.Client) *ByteCache

NewByteCache creates a new Redis byte cache using the provided Redis client.

func (*ByteCache) Close

func (c *ByteCache) Close() error

func (*ByteCache) Del

func (c *ByteCache) Del(ctx context.Context, key string) error

func (*ByteCache) DelAll

func (c *ByteCache) DelAll(ctx context.Context) error

func (*ByteCache) Exists

func (c *ByteCache) Exists(ctx context.Context, key string) (bool, error)

func (*ByteCache) Get

func (c *ByteCache) Get(ctx context.Context, key string) ([]byte, bool, error)

func (*ByteCache) GetDel added in v0.0.3

func (c *ByteCache) GetDel(ctx context.Context, key string) ([]byte, bool, error)

func (*ByteCache) MultiDel

func (c *ByteCache) MultiDel(ctx context.Context, keys []string) error

func (*ByteCache) MultiGet

func (c *ByteCache) MultiGet(ctx context.Context, keys []string) (map[string][]byte, error)

func (*ByteCache) MultiSet

func (c *ByteCache) MultiSet(ctx context.Context, valMap map[string][]byte) error

func (*ByteCache) MultiSetWithTTL

func (c *ByteCache) MultiSetWithTTL(ctx context.Context, valMap map[string][]byte, expiration time.Duration) error

func (*ByteCache) Set

func (c *ByteCache) Set(ctx context.Context, key string, val []byte) error

func (*ByteCache) SetWithTTL

func (c *ByteCache) SetWithTTL(ctx context.Context, key string, val []byte, expiration time.Duration) error

Jump to

Keyboard shortcuts

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