MCPcopy Create free account
hub / github.com/TheCSir/TerminalStart / loadCache

Function loadCache

src/hooks/useMarketData.ts:13–21  ·  view source on GitHub ↗
(provider: MarketProvider)

Source from the content-addressed store, hash-verified

11}
12
13function loadCache(provider: MarketProvider): CachedData | null {
14 try {
15 const raw = localStorage.getItem(cacheKey(provider));
16 if (!raw) return null;
17 return JSON.parse(raw);
18 } catch {
19 return null;
20 }
21}
22
23function saveCache(provider: MarketProvider, quotes: MarketQuote[]) {
24 try {

Callers 1

useMarketDataFunction · 0.70

Calls 1

cacheKeyFunction · 0.85

Tested by

no test coverage detected