redis

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Addr     string
	Password string
	DB       int
}

Options defines the connection parameters for Redis.

type Store

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

func New

func New(opts Options) *Store

New creates a new Redis cache store.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, key string) error

func (*Store) Get

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

func (*Store) InvalidateTags

func (s *Store) InvalidateTags(ctx context.Context, tags ...string) error

func (*Store) Ping

func (s *Store) Ping(ctx context.Context) error

Ping checks the connectivity to the Redis server.

func (*Store) Set

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

Jump to

Keyboard shortcuts

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