import type { CacheEntry } from "cachified"; import LRUCache from "lru-cache"; declare global { // This preserves the LRU cache during development // eslint-disable-next-line var __lruCache: LRUCache> | undefined; } export const cache = (global.__lruCache = global.__lruCache ? global.__lruCache : new LRUCache>({ max: 5000 })); export const ttl = (ms: number) => process.env.NODE_ENV === "production" ? ms : 0;