kvmemcache

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 4 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 New

func New(conf Config) *Cache

func (*Cache) Evict

func (c *Cache) Evict(key string)

func (*Cache) Get

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

func (*Cache) Stats

func (c *Cache) Stats() Stats

type Config

type Config struct {
	MaxSize int
	TTL     time.Duration // Zero to ignore.
	Src     func(string) (interface{}, error)
}

type Stats

type Stats struct {
	Hits   uint64
	Misses uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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