cache

package
v0.0.0-...-041d6b2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("key doesn't exist in cache")

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Store(key string, value interface{}) error
	StoreWithTTL(key string, value interface{}, ttl time.Duration) error
	Get(key string, value interface{}) error
	Delete(key string)
	Keys() []string
	Exists(key string) bool
}

type CacheManager

type CacheManager interface {
	// Cache returns kv cache with specific name
	Cache(name string) Cache
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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