MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / getCache

Function getCache

src/components/FieldDetailView.tsx:101–103  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

99}
100
101function getCache<T>(key: string): Record<string, { data: T; timestamp: number }> {
102 try { const c = localStorage.getItem(key); return c ? JSON.parse(c) : {}; } catch { return {}; }
103}
104function setCache<T>(key: string, id: string, data: T) {
105 const cache = getCache<T>(key);
106 (cache as any)[id] = { data, timestamp: Date.now() };

Callers 3

setCacheFunction · 0.85
GrowthStageSectionFunction · 0.85
FieldDetailViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected