MCPcopy Index your code
hub / github.com/epicweb-dev/epic-stack / searchCacheKeys

Function searchCacheKeys

app/utils/cache.server.ts:159–167  ·  view source on GitHub ↗
(search: string, limit: number)

Source from the content-addressed store, hash-verified

157}
158
159export async function searchCacheKeys(search: string, limit: number) {
160 return {
161 sqlite: cacheDb
162 .prepare('SELECT key FROM cache WHERE key LIKE ? LIMIT ?')
163 .all(`%${search}%`, limit)
164 .map((row) => (row as { key: string }).key),
165 lru: [...lru.keys()].filter((key) => key.includes(search)),
166 }
167}
168
169export async function cachified<Value>(
170 {

Callers 1

loaderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected