Increase cache sizes
This commit is contained in:
6 files changed
+7
-9
No files matched your search
@@ -63,7 +63,6 @@ public class AppConfig {
|
||||
*/
|
||||
@Nullable
|
||||
public static File getDirInExternalAppDir(String filename) {
|
||||
|
||||
File appFolder = getExternalAppDir();
|
||||
if (appFolder != null) {
|
||||
File dir = new File(appFolder, filename);
|
||||
|
||||
@@ -217,7 +217,7 @@ public class EhApplication extends RecordingApplication {
|
||||
builder.memoryCacheMaxSize = getMemoryCacheMaxSize();
|
||||
builder.hasDiskCache = true;
|
||||
builder.diskCacheDir = new File(context.getCacheDir(), "thumb");
|
||||
builder.diskCacheMaxSize = 80 * 1024 * 1024; // 80MB
|
||||
builder.diskCacheMaxSize = 320 * 1024 * 1024; // 320MB
|
||||
builder.okHttpClient = getOkHttpClient(context);
|
||||
builder.objectHelper = getImageBitmapHelper(context);
|
||||
builder.debug = DEBUG_CONACO;
|
||||
@@ -247,7 +247,7 @@ public class EhApplication extends RecordingApplication {
|
||||
EhApplication application = ((EhApplication) context.getApplicationContext());
|
||||
if (null == application.mSpiderInfoCache) {
|
||||
application.mSpiderInfoCache = new SimpleDiskCache(
|
||||
new File(context.getCacheDir(), "spider_info"), 5 * 1024 * 1024); // 5M
|
||||
new File(context.getCacheDir(), "spider_info"), 20 * 1024 * 1024); // 20M
|
||||
}
|
||||
return application.mSpiderInfoCache;
|
||||
}
|
||||
@@ -418,9 +418,6 @@ public class EhApplication extends RecordingApplication {
|
||||
if (null != dir) {
|
||||
FileUtils.deleteContent(dir);
|
||||
}
|
||||
|
||||
// Add .nomedia to external temp dir
|
||||
CommonOperations.ensureNoMediaFile(UniFile.fromFile(AppConfig.getExternalTempDir()));
|
||||
}
|
||||
|
||||
private void update() {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class Settings {
|
||||
public static final String DEFAULT_SECURITY = "";
|
||||
public static final String KEY_ENABLE_FINGERPRINT = "enable_fingerprint";
|
||||
public static final String KEY_READ_CACHE_SIZE = "read_cache_size";
|
||||
public static final int DEFAULT_READ_CACHE_SIZE = 160;
|
||||
public static final int DEFAULT_READ_CACHE_SIZE = 320;
|
||||
public static final String KEY_BUILT_IN_HOSTS = "built_in_hosts_2";
|
||||
public static final String KEY_DOH = "dns_over_https";
|
||||
public static final String KEY_DOMAIN_FRONTING = "domain_fronting";
|
||||
|
||||
@@ -61,7 +61,7 @@ public final class SpiderDen {
|
||||
|
||||
public static void initialize(Context context) {
|
||||
sCache = new SimpleDiskCache(new File(context.getCacheDir(), "image"),
|
||||
MathUtils.clamp(Settings.getReadCacheSize(), 40, 640) * 1024 * 1024);
|
||||
MathUtils.clamp(Settings.getReadCacheSize(), 40, 1280) * 1024 * 1024);
|
||||
}
|
||||
|
||||
public static UniFile getGalleryDownloadDir(GalleryInfo galleryInfo) {
|
||||
|
||||
Reference in new issue
Block a user