MCPcopy
hub / github.com/chartdb/chartdb / getFromCache

Function getFromCache

src/lib/data/sql-export/export-sql-cache.ts:4–11  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

2import { sha256 } from '@/lib/utils';
3
4export const getFromCache = (key: string): string | null => {
5 try {
6 return localStorage.getItem(`sql-export-${key}`);
7 } catch (e) {
8 console.warn('Failed to read from localStorage:', e);
9 return null;
10 }
11};
12
13export const setInCache = (key: string, value: string): void => {
14 try {

Callers 1

exportSQLFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected