v0.5.1: 修复缓存/FM/翻译/Linux等问题

This commit is contained in:
2026-05-25 19:38:48 +08:00
parent 65ed71503e
commit 6da544cffb
16 changed files with 147 additions and 33 deletions

View File

@ -22,3 +22,9 @@ export function pageCacheDelete(key: string) {
export function pageCacheInvalidate(key: string) {
cache.delete(key);
}
export function pageCacheIsStale(key: string): boolean {
const entry = cache.get(key);
if (!entry) return true;
return Date.now() - entry.ts > TTL;
}