nop

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 3 Imported by: 5

Documentation

Overview

Package nop is a no-operation caching.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCache = errors.New("not using cache")

ErrNoCache is default Get error return.

Functions

This section is empty.

Types

type Client

type Client struct{}

Client is no-operation client.

func New

func New() (*Client, error)

New to create no-operation cache.

func (*Client) Close

func (c *Client) Close() error

Close will just return nil.

func (*Client) Delete

func (c *Client) Delete(_ context.Context, _ string) error

Delete will just return nil.

func (*Client) Get

func (c *Client) Get(_ context.Context, _ string, _ interface{}) error

Get will just return error to simulate as if data is not in cache.

func (*Client) Set

func (c *Client) Set(_ context.Context, _ string, _ interface{}, _ ...time.Duration) error

Set will just return nil.

Jump to

Keyboard shortcuts

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