mirror of
https://github.com/atdunbg/Nekosonic-Music.git
synced 2026-06-22 00:58:51 +08:00
v0.5.1: 修复缓存/FM/翻译/Linux等问题
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user