Use a separate executor for network loads to avoid stalling cached loads. Optimize background cache fill loads.

This commit is contained in:
Cameron Gutman
2015-03-02 18:34:21 -05:00
parent 56c8a9e6fe
commit 899387caa1
4 changed files with 73 additions and 61 deletions

View File

@@ -30,6 +30,10 @@ public class CacheHelper {
return f;
}
public static boolean cacheFileExists(File root, String... path) {
return openPath(false, root, path).exists();
}
public static InputStream openCacheFileForInput(File root, String... path) throws FileNotFoundException {
return new BufferedInputStream(new FileInputStream(openPath(false, root, path)));
}