MCPcopy
hub / github.com/wavetermdev/waveterm / makeCacheEntry

Function makeCacheEntry

pkg/filestore/blockstore_cache.go:317–327  ·  view source on GitHub ↗
(zoneId string, name string)

Source from the content-addressed store, hash-verified

315}
316
317func makeCacheEntry(zoneId string, name string) *CacheEntry {
318 return &CacheEntry{
319 Lock: &sync.Mutex{},
320 ZoneId: zoneId,
321 Name: name,
322 PinCount: 0,
323 File: nil,
324 DataEntries: make(map[int]*DataCacheEntry),
325 FlushErrors: 0,
326 }
327}
328
329func (entry *CacheEntry) flushToDB(ctx context.Context, replace bool) error {
330 if entry.File == nil {

Callers 1

getEntryAndPinMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected