Help us shape the future of Go! Take the 2026 Go Developer Survey

nocache

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 2 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(_ string) error

Delete will just return nil.

func (*Client) Get

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

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

func (*Client) Set

func (c *Client) Set(_ 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