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

Function NewMemoryCache

internal/cache/cache.go:327–334  ·  view source on GitHub ↗

NewMemoryCache creates an in-memory only cache (no persistence).

()

Source from the content-addressed store, hash-verified

325
326// NewMemoryCache creates an in-memory only cache (no persistence).
327func NewMemoryCache() *FileCache {
328 return &FileCache{
329 inMemory: make(map[string]*list.Element),
330 lruList: list.New(),
331 maxSize: 0, // Unlimited
332 persisted: false,
333 }
334}
335
336// NewMemoryCacheWithSize creates an in-memory cache with a size limit.
337func NewMemoryCacheWithSize(maxSize int) *FileCache {

Calls

no outgoing calls