Parcourir la source

cache expired time exclude download_plugin

hanjing il y a 7 ans
Parent
commit
0a06784744
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      app/src/main/java/org/afinal/simplecache/ACache.java

+ 1 - 1
app/src/main/java/org/afinal/simplecache/ACache.java

@@ -151,7 +151,7 @@ public class ACache {
         File file = mCache.get(key);
         File file = mCache.get(key);
         if (!file.exists())
         if (!file.exists())
             return null;
             return null;
-        if (System.currentTimeMillis() - file.lastModified() > TIME_HOUR) {
+        if (!key.contains("download_plugin") && System.currentTimeMillis() - file.lastModified() > TIME_HOUR/30) {
             file.deleteOnExit();
             file.deleteOnExit();
             return null;
             return null;
         }
         }