Update staticid system for viewing news.

This commit is contained in:
yuanhau 2025-05-26 23:56:21 +08:00
parent 0ed7ca8f80
commit 9accdb28c1
6 changed files with 109 additions and 151 deletions

View file

@ -1,6 +1,6 @@
const cacheEnabled = true;
let cachedData: { data: string[]; timestamp: number } | null = null;
const CACHE_DURAION = 1000 * 60 * 60; // 1 Hour
const CACHE_DURATION = 1000 * 60 * 60; // 1 Hour
export default defineEventHandler(async (event) => {
if (
cachedData &&