MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / Load

Method Load

internal/cache/weak_cache.go:28–37  ·  view source on GitHub ↗
(key K)

Source from the content-addressed store, hash-verified

26}
27
28func (c *WeakCacheMap[K, V]) Load(key K) (value *V, ok bool) {
29 c.mu.Lock()
30 defer c.mu.Unlock()
31 entry, exists := c.m[key]
32 if !exists {
33 return nil, false
34 }
35 value = entry.weakPtr.Value()
36 return value, value != nil
37}
38
39func (c *WeakCacheMap[K, V]) Store(key K, value *V) {
40 c.mu.Lock()

Callers 14

RunningFunction · 0.45
BuildIndexFunction · 0.45
GetStorageByMountPathFunction · 0.45
ManualScanRunningFunction · 0.45
StopManualScanFunction · 0.45
OnDownloadStartMethod · 0.45
OnDownloadPauseMethod · 0.45
OnDownloadStopMethod · 0.45
OnDownloadCompleteMethod · 0.45
OnDownloadErrorMethod · 0.45
OnBtDownloadCompleteMethod · 0.45
MemoryGrowCheckFunction · 0.45

Calls 1

UnlockMethod · 0.65

Tested by

no test coverage detected