nullcache

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package nullcache implements the presto.Cache interface with an empty data structure that never stores any data, and always reports a cache "miss". It is an empty placeholder for testing purposes only, that can be put anywhere an actual cache would go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullCache

type NullCache struct{}

NullCache implements the presto.Cache interface with an empty data structure that never stores any data, and always reports a cache "miss". It is an empty placeholder for testing purposes only, that can be put anywhere an actual cache would go.

func New

func New() *NullCache

New returns a new cache that is ready to "use"

func (*NullCache) Get

func (null *NullCache) Get(key string) string

Get returns the (null) value for any required cache key

func (*NullCache) Set

func (null *NullCache) Set(key string, value string) *derp.Error

Set is a NOOP for setting a value in the cache.

Jump to

Keyboard shortcuts

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