cache

package module
v0.0.0-...-14a8d8d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 5 Imported by: 0

README

Redis Cache Backend

Redis Backend for github.com/gowool/cache

Installation

go get -u github.com/gowool/rediscachebe

License

Distributed under MIT License, please see license file within the code for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewBackend

func NewBackend(prefix string, client redis.UniversalClient) Backend

func (Backend) Del

func (b Backend) Del(ctx context.Context, key string) error

func (Backend) DelAll

func (b Backend) DelAll(ctx context.Context) (err error)

func (Backend) Get

func (b Backend) Get(ctx context.Context, key string) ([]byte, error)

func (Backend) Set

func (b Backend) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error

Jump to

Keyboard shortcuts

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