cache

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheEngine

type CacheEngine struct {
	// contains filtered or unexported fields
}

CacheEngine handles the caching operations

func New

func New(cacheFeatureOn bool) *CacheEngine

New initiates a new caching engine

func Resolve

func Resolve() *CacheEngine

Resolve resolves initiated caching engine

func (*CacheEngine) Delete

func (c *CacheEngine) Delete(key string) error

Delete removes a record from cache by a given key

func (*CacheEngine) Get

func (c *CacheEngine) Get(key string) (interface{}, error)

Get retrieves a val from cache by a given key

func (*CacheEngine) Set

func (c *CacheEngine) Set(key string, val string) (bool, error)

Set set a key, val pair in the cache

Jump to

Keyboard shortcuts

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