cache

package module
v0.0.0-...-5cf3e9b Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

README

go-whosonfirst-cache-bigcache

Important

This package has been officially deprecated. Please use the go-cache package instead.

Install

You will need to have both Go (specifically a version of Go more recent than 1.7 so let's just assume you need Go 1.9 or higher) and the make programs installed on your computer. Assuming you do just type:

make bin

All of this package's dependencies are bundled with the code in the vendor directory.

See also

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigCacheCache

type BigCacheCache struct {
	wof_cache.Cache
	Options *BigCacheCacheOptions
	// contains filtered or unexported fields
}

func (*BigCacheCache) Evictions

func (c *BigCacheCache) Evictions() int64

func (*BigCacheCache) Get

func (c *BigCacheCache) Get(key string) (io.ReadCloser, error)

func (*BigCacheCache) Hits

func (c *BigCacheCache) Hits() int64

func (*BigCacheCache) Misses

func (c *BigCacheCache) Misses() int64

func (*BigCacheCache) Set

func (c *BigCacheCache) Set(key string, fh io.ReadCloser) (io.ReadCloser, error)

func (*BigCacheCache) Size

func (c *BigCacheCache) Size() int64

func (*BigCacheCache) Unset

func (c *BigCacheCache) Unset(key string) error

type BigCacheCacheOptions

type BigCacheCacheOptions struct {
	HardMaxCacheSize int
	MaxEntrySize     int
	TimeToExpire     time.Duration
}

func BigCacheCacheOptionsFromArgs

func BigCacheCacheOptionsFromArgs(args map[string]string) (*BigCacheCacheOptions, error)

func DefaultBigCacheCacheOptions

func DefaultBigCacheCacheOptions() (*BigCacheCacheOptions, error)

Jump to

Keyboard shortcuts

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