cache

package
v0.0.0-...-251cc68 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheDB

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

CacheDB represent a BigCache instance.

func NewCacheDB

func NewCacheDB(customConfig bigcache.Config) (*CacheDB, error)

NewCacheDB creates a new bigcache database.

func (*CacheDB) Get

func (c *CacheDB) Get(id string) ([]byte, error)

Get reads entry for the key.

func (*CacheDB) Len

func (c *CacheDB) Len() int

Len computes number of entries in cache.

func (*CacheDB) Reset

func (c *CacheDB) Reset() error

Reset empties all cache shards.

func (*CacheDB) Set

func (c *CacheDB) Set(id string, name []byte) error

Set saves entry under the key.

Jump to

Keyboard shortcuts

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