lru

package
v0.0.0-...-e43023e Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package lru provides a simple LRU cache for Helix Cluster OS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache is an LRU cache.

func NewCache

func NewCache(capacity int) *Cache

NewCache creates a new Cache with the given capacity.

func (*Cache) Get

func (c *Cache) Get(key string) (interface{}, bool)

Get retrieves a value.

func (*Cache) Put

func (c *Cache) Put(key string, value interface{})

Put inserts or updates a value.

Jump to

Keyboard shortcuts

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