From 605b024cf0331bf43f99f081934a2e899eb08632 Mon Sep 17 00:00:00 2001 From: mertalev <101130780+mertalev@users.noreply.github.com> Date: Fri, 19 Sep 2025 09:23:32 -0400 Subject: [PATCH] disable disk cache by default --- .../infrastructure/repositories/network.repository.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mobile/lib/infrastructure/repositories/network.repository.dart b/mobile/lib/infrastructure/repositories/network.repository.dart index ceff265711..a73322cb5c 100644 --- a/mobile/lib/infrastructure/repositories/network.repository.dart +++ b/mobile/lib/infrastructure/repositories/network.repository.dart @@ -28,12 +28,14 @@ class NetworkRepository { const NetworkRepository(); + /// Note: when disk caching is enabled, only one client may use a given directory at a time. + /// Different isolates or engines must use different directories. http.Client getHttpClient( String directoryName, { - int diskCapacity = 100 << 20, - int memoryCapacity = 10 << 20, + CacheMode cacheMode = CacheMode.memory, + int diskCapacity = 0, int maxConnections = 6, - CacheMode cacheMode = CacheMode.disk, + int memoryCapacity = 10 << 20, }) { final cachedClient = _clients[directoryName]; if (cachedClient != null) {