bigcache

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bigcache

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

func NewBigcache

func NewBigcache(c *Config) (*Bigcache, error)

func (*Bigcache) Delete

func (c *Bigcache) Delete(key string) error

func (*Bigcache) Get

func (c *Bigcache) Get(key string, ptrToObject interface{}) error

func (*Bigcache) Set

func (c *Bigcache) Set(key string, object interface{}) error

type Config

type Config struct {
	MaxCacheSizeInMB int
	//CacheLifetime if set, entries older than the lifetime will be deleted on cleanup (every minute)
	CacheLifetime time.Duration
}

func (*Config) NewCache

func (c *Config) NewCache() (cache.Cache, error)

Jump to

Keyboard shortcuts

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