MCPcopy Create free account
hub / github.com/ericls/imgdd / GetMetaCached

Function GetMetaCached

storage/file_metadata_cache.go:12–21  ·  view source on GitHub ↗
(storage Storage, storageDefId string, filename string)

Source from the content-addressed store, hash-verified

10}
11
12func GetMetaCached(storage Storage, storageDefId string, filename string) FileMeta {
13 key := cacheKey{storageDefId, filename}
14 if meta, ok := metaCache.Get(key); ok {
15 return meta
16 }
17
18 meta := storage.GetMeta(filename)
19 metaCache.Add(key, meta)
20 return meta
21}

Callers 2

makeImageHandlerFunction · 0.92
makeDirectImageHandlerFunction · 0.92

Calls 2

GetMethod · 0.65
GetMetaMethod · 0.65

Tested by

no test coverage detected