cache

package
v0.0.0-...-4fdff84 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewItem

func NewItem(key, value interface{}, expires time.Duration) *item

Types

type Cacher

type Cacher interface {
	Add(Key, Value)
	Has(Key) bool
	Get(Key) (Value, bool)
	Remove(Key)
}

func NewARC

func NewARC(size int) (Cacher, error)

type Key

type Key interface {
	Key() interface{}
}

type Value

type Value interface {
	Stale() bool
	Value() interface{}
}

Jump to

Keyboard shortcuts

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