nocache

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 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 NoCache

type NoCache struct{}

NoCache is used for testing purposes.

func NewNoCache

func NewNoCache() *NoCache

NewNoCache creates a NoCache struct.

func (*NoCache) Close

func (nc *NoCache) Close()

Close returns the connection back to the pool for storage drivers that utilize a pool.

func (*NoCache) Conn

func (nc *NoCache) Conn(ctx context.Context) (remember.Cacher, error)

Conn will provide a "pretend" connection.

func (*NoCache) Forget

func (nc *NoCache) Forget(key string) error

Forget clears the value from the cache for the particular key.

func (*NoCache) ForgetAll

func (nc *NoCache) ForgetAll() error

ForgetAll clears all values from the cache.

func (*NoCache) Get

func (nc *NoCache) Get(key string) (_ interface{}, found bool, _ error)

Get returns a value from the cache if the key exists.

func (*NoCache) Set

func (nc *NoCache) Set(key string, expiration time.Duration, itemToStore interface{}) error

Set sets a item into the cache for a particular key.

func (*NoCache) StorePointer

func (nc *NoCache) StorePointer() bool

StorePointer sets whether a storage driver requires itemToStore to be stored as a pointer or as a concrete value.

Jump to

Keyboard shortcuts

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