cache_old

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCacheOptions

func NewCacheOptions() *cacheOptions

func NewPriorityQueue

func NewPriorityQueue[T any](comp func(a, b T) bool, swap func(a, b T)) *priorityQueue[T]

Types

type Cache

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

	Clear()

	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