lrucache

package
v1.999.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(size int) (*lruCache, error)

NewCache creates a new LRU cache instance

func NewCacheWithEviction

func NewCacheWithEviction(size int, onEvicted func(key interface{}, value interface{})) (*lruCache, error)

NewCacheWithEviction creates a new sized LRU cache instance with eviction function

func NewCacheWithSizeInBytes

func NewCacheWithSizeInBytes(size int, sizeInBytes int64) (*lruCache, error)

NewCacheWithSizeInBytes creates a new sized LRU cache instance

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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