nop

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nop

type Nop struct{}

Nop implements Cache interface with no operation, commonly used for testing

func New

func New() *Nop

New creates new Nop cache

func (*Nop) Del

func (n *Nop) Del(ctx context.Context, keys ...string) error

Del do nothing and return nil error

func (*Nop) Get

func (n *Nop) Get(ctx context.Context, key string, dest interface{}) error

Get always returns errorx.ErrNotFound

func (*Nop) Set

func (n *Nop) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

Set do nothing and return nil error

Jump to

Keyboard shortcuts

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