MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / FileCache

Struct FileCache

internal/cache/cache.go:43–50  ·  view source on GitHub ↗

FileCache implements a simple file-based cache with LRU eviction.

Source from the content-addressed store, hash-verified

41
42// FileCache implements a simple file-based cache with LRU eviction.
43type FileCache struct {
44 dir string
45 mutex sync.RWMutex
46 inMemory map[string]*list.Element // Map key to list element
47 lruList *list.List // Doubly-linked list for LRU tracking
48 maxSize int // Maximum number of items (0 = unlimited)
49 persisted bool
50}
51
52// lruEntry represents an entry in the LRU cache.
53type lruEntry struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected