Checks if a cache entry exists and is not expired.
Cache key to validate.
True if entry exists and has not exceeded CACHE_EXPIRY; false otherwise.
export function isCacheValid(key: string): boolean { const entry = mangaCache[key]; if (!entry) return false; return Date.now() - entry.timestamp < CACHE_EXPIRY;} Copy
export function isCacheValid(key: string): boolean { const entry = mangaCache[key]; if (!entry) return false; return Date.now() - entry.timestamp < CACHE_EXPIRY;}
Checks if a cache entry exists and is not expired.