persist

package
v0.0.0-...-70c2af6 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCacheMiss = errors.New("persist cache miss error")

ErrCacheMiss represent the cache key does not exist in the store

Functions

This section is empty.

Types

type CacheStore

type CacheStore interface {
	// Get retrieves an item from the Cache. if key does not exist in the store, return ErrCacheMiss
	Get(key string, value interface{}) error

	// Set sets an item to the Cache, replacing any existing item.
	Set(key string, value interface{}, expire time.Duration) error

	// Delete removes an item from the Cache. Does nothing if the key is not in the Cache.
	Delete(key string) error
}

CacheStore is the interface of a Cache backend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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