mirror of
https://github.com/immich-app/immich.git
synced 2026-05-27 10:02:31 -04:00
optimize disabled cache
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user