mirror of
https://github.com/immich-app/immich.git
synced 2025-07-07 18:24:10 -04:00
optimize disabled cache
This commit is contained in:
parent
56cb8316a1
commit
f8f21dafeb
@ -75,8 +75,11 @@ async function fetchWithCancellation(request: URL | Request | string, cache: Cac
|
||||
}
|
||||
|
||||
async function checkCache(url: URL | Request | string) {
|
||||
if (!useCache) {
|
||||
return;
|
||||
}
|
||||
const cache = await caches.open(CACHE);
|
||||
const response = useCache ? await cache.match(url) : undefined;
|
||||
const response = await cache.match(url);
|
||||
return { cache, response };
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user