fix(S3): use own S3 Lru Cache

This commit is contained in:
Manuel Jenny 2021-04-20 16:43:01 +02:00
parent 4e082d5f8a
commit cf715bc000
No known key found for this signature in database
GPG Key ID: 1C80FE62B2BEAA18

View File

@ -44,7 +44,7 @@ import java.util.List;
import timber.log.Timber;
import static org.cryptomator.domain.usecases.cloud.Progress.progress;
import static org.cryptomator.util.file.LruFileCacheUtil.Cache.PCLOUD;
import static org.cryptomator.util.file.LruFileCacheUtil.Cache.S3;
import static org.cryptomator.util.file.LruFileCacheUtil.retrieveFromLruCache;
import static org.cryptomator.util.file.LruFileCacheUtil.storeToLruCache;
@ -297,9 +297,9 @@ class S3Impl {
private boolean createLruCache(int cacheSize) {
if (diskLruCache == null) {
try {
diskLruCache = DiskLruCache.create(new LruFileCacheUtil(context).resolve(PCLOUD), cacheSize);
diskLruCache = DiskLruCache.create(new LruFileCacheUtil(context).resolve(S3), cacheSize);
} catch (IOException e) {
Timber.tag("PCloudImpl").e(e, "Failed to setup LRU cache");
Timber.tag("S3Impl").e(e, "Failed to setup LRU cache");
return false;
}
}