cache

package
v0.0.0-...-128b944 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Coster

func Coster(v interface{}) int64

Coster returns the cost of a given value in bytes.

Types

type Cache

type Cache struct {
	*ristretto.Cache
}

Cache is a simple wrapper around ristretto.Cache.

func New

func New(maxKeys, maxCost int64) (*Cache, error)

New creates a new Cache.

Jump to

Keyboard shortcuts

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