lrucache

package
v1.2.18 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: GPL-3.0 Imports: 4 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