MCPcopy Create free account
hub / github.com/dailydotdev/apps / getCachedOrNull

Function getCachedOrNull

packages/shared/src/contexts/BootProvider.tsx:115–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113};
114
115const getCachedOrNull = () => {
116 try {
117 // catch below fallbacks falsy values
118 return JSON.parse(storage.getItem(BOOT_LOCAL_KEY) as string);
119 } catch (err) {
120 return null;
121 }
122};
123
124// /boot only reissues a token with under 4 minutes left, so past this margin a
125// reissued token means the cached expiry was wrong

Callers 1

BootDataProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected