diff --git a/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java b/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java index fea1db7..905d7c5 100644 --- a/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java +++ b/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java @@ -66,7 +66,8 @@ private void updateCacheSize(DiskStorageCache cache) throws NoSuchMethodExceptio @ReactMethod public void getImageCacheSize(Promise promise){ - FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache(); + //FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache(); + FileCache cache1 = ImagePipelineFactory.getInstance().getMainFileCache(); // fixed RN-0.43+ long size1 = cache1.getSize(); if (size1 < 0){ try { @@ -77,7 +78,8 @@ public void getImageCacheSize(Promise promise){ } size1 = cache1.getSize(); } - FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache(); + //FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache(); + FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageFileCache(); //fixed RN-0.43+ long size2 = cache2.getSize(); if (size2 < 0){ try {