redis

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapter

func NewAdapter(r rediser, opts ...AdapterOption) cache.Adapter

NewAdapter initializes Redis adapter.

Types

type Adapter

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

Adapter is the memory adapter data structure.

func (*Adapter) Get

func (a *Adapter) Get(key uint64) ([]byte, bool)

Get implements the cache Adapter interface Get method.

func (*Adapter) Release

func (a *Adapter) Release(key uint64)

Release implements the cache Adapter interface Release method.

func (*Adapter) Set

func (a *Adapter) Set(key uint64, response []byte, expiration time.Time)

Set implements the cache Adapter interface Set method.

type AdapterOption

type AdapterOption func(a *Adapter) error

func AdapterWithPrefixKey

func AdapterWithPrefixKey(prefixKey string) AdapterOption

Jump to

Keyboard shortcuts

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