cache

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCacheOptions

func NewCacheOptions() *cacheOptions

Types

type Cache

type Cache[Key comparable, Value any] interface {
	Set(Key, Value)
	Get(Key) (value Value, ok bool)

	Size() int
	DeleteExpiredItems()
	FlushKOldest(int)
	Flush()

	Stop()
}

func NewCache

func NewCache[Key comparable, Value any](options *cacheOptions) Cache[Key, Value]

options must be define - use the NewCacheOptions to get the default values

Jump to

Keyboard shortcuts

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