levelcache

package
v5.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(cacheDir string, janitorInterval time.Duration) (*Cache, error)

func (*Cache) Delete

func (this *Cache) Delete(key []byte) error

func (*Cache) Free

func (this *Cache) Free()

func (*Cache) Get

func (this *Cache) Get(key []byte) ([]byte, error)

func (*Cache) Set

func (this *Cache) Set(key, value []byte, expireSeconds int64) error

type CacheBin

type CacheBin struct {
	AddTime int64
	Expire  int64
	Size    int64
}

type CacheValue

type CacheValue struct {
	*CacheBin

	Value []byte
}

Jump to

Keyboard shortcuts

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