cache

package
v0.0.0-...-ae13d62 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveCache

func SaveCache()

Types

type Cache

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

The first encapsulation of the cache is still the underlying cache in the LRU

func GetCache

func GetCache(name string) *Cache

func NewCache

func NewCache(name string, capacity int) *Cache

func NewDefaultCache

func NewDefaultCache() *Cache

func (*Cache) Delete

func (c *Cache) Delete(key string) bool

func (*Cache) Get

func (c *Cache) Get(key string) (string, error)

func (*Cache) RegisterNodes

func (c *Cache) RegisterNodes(nodes node.NodePicker)

func (*Cache) Set

func (c *Cache) Set(key string, v string, ttl ...int64) bool

Jump to

Keyboard shortcuts

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