Disable full file caches for now

This is only needed for ML indexing, let us revisit this once the ML flow is
done instead of adding a premature and possibly disk-space heavy optimization.
This commit is contained in:
Manav Rathi 2024-04-15 11:50:23 +05:30
parent f5fa3128a7
commit 896cf0f785
No known key found for this signature in database

View file

@ -7,7 +7,6 @@ import { CustomError } from "@ente/shared/error";
import { Events, eventBus } from "@ente/shared/events";
import { Remote } from "comlink";
import { FILE_TYPE } from "constants/file";
import isElectron from "is-electron";
import { EnteFile } from "types/file";
import {
generateStreamFromArrayBuffer,
@ -89,11 +88,12 @@ class DownloadManagerImpl {
e,
);
}
try {
if (isElectron()) this.fileCache = await openCache("files");
} catch (e) {
log.error("Failed to open file cache, will continue without it", e);
}
// TODO (MR): Revisit full file caching cf disk space usage
// try {
// if (isElectron()) this.fileCache = await openCache("files");
// } catch (e) {
// log.error("Failed to open file cache, will continue without it", e);
// }
this.cryptoWorker = await ComlinkCryptoWorker.getInstance();
this.ready = true;
eventBus.on(Events.LOGOUT, this.logoutHandler.bind(this), this);