nocache

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package nocache is a mock of 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 nocache client.

func New

func New() (*Client, error)

New to create fake 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