π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
remove logging
Abhinav260292f981f2
diff --git a/src/services/diskCache.ts b/src/services/diskCache.tsindex 32a8885d6e..fbcf661449 100644--- a/src/services/diskCache.ts+++ b/src/services/diskCache.ts@@ -5,7 +5,7 @@ import path from 'path';import { LimitedCache } from '../types/cache';import { logError } from './logging';import { getFileStream, writeStream } from './fs';-import log from 'electron-log';+// import log from 'electron-log';const DEFAULT_CACHE_LIMIT = 1000 * 1000 * 1000; // 1GB@@ -29,13 +29,13 @@ export class DiskCache implements LimitedCache {{ sizeInBytes }: { sizeInBytes?: number } = {}): Promise<Response> {const cachePath = path.join(this.cacheBucketDir, cacheKey);- log.info(`Checking cache key: ${cacheKey}`);+ // log.info(`Checking cache key: ${cacheKey}`);if (existsSync(cachePath)) {- log.info(`Cache key exists: ${cacheKey}`);+ // log.info(`Cache key exists: ${cacheKey}`);const fileStats = await stat(cachePath);- log.info(- `Cache key size: ${fileStats.size} , expected: ${sizeInBytes}`- );+ // log.info(+ // `Cache key size: ${fileStats.size} , expected: ${sizeInBytes}`+ // );if (sizeInBytes && fileStats.size !== sizeInBytes) {logError(Error(),@@ -44,18 +44,18 @@ export class DiskCache implements LimitedCache {unlink(cachePath);return undefined;}- log.info(`Cache key size matches: ${cacheKey}`);+ // log.info(`Cache key size matches: ${cacheKey}`);DiskLRUService.touch(cachePath);return new Response(await getFileStream(cachePath));} else {- log.info(`Cache key does not exist: ${cacheKey}`);+ // log.info(`Cache key does not exist: ${cacheKey}`);// add fallback for old cache keysconst oldCachePath = getOldAssetCachePath(this.cacheBucketDir,cacheKey);if (existsSync(oldCachePath)) {- log.info(`Old cache key exists: ${cacheKey}`);+ // log.info(`Old cache key exists: ${cacheKey}`);const fileStats = await stat(oldCachePath);if (sizeInBytes && fileStats.size !== sizeInBytes) {logError(@@ -66,7 +66,7 @@ export class DiskCache implements LimitedCache {return undefined;}const match = new Response(await getFileStream(oldCachePath));- log.info(`Old cache key size matches: ${cacheKey}`);+ // log.info(`Old cache key size matches: ${cacheKey}`);void migrateOldCacheKey(oldCachePath, cachePath);return match;}