Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key added in v0.1.5

type Key = lru.Key

Key is an alias of lru.Key

type ThreadSafeLruCache

type ThreadSafeLruCache = lru.Cache

ThreadSafeLruCache is an alias of lru.Cache

func NewThreadSafeLruCache

func NewThreadSafeLruCache(maxEntries int) *ThreadSafeLruCache

NewThreadSafeLruCache returns a thread safe lru cache with fix size

func NewThreadSafeLruCacheWithOnEvicted added in v0.1.5

func NewThreadSafeLruCacheWithOnEvicted(maxEntries int, onEvicted func(key Key, value interface{})) *ThreadSafeLruCache

NewThreadSafeLruCacheWithOnEvicted returns a thread safe lru cache with fix size

Directories

Path Synopsis
Package lru implements an LRU cache.
Package lru implements an LRU cache.

Jump to

Keyboard shortcuts

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