动态缓存是不是还没有实现
Kunsan16 opened this issue · 1 comments
Kunsan16 commented
这段代码是不是没用到
if (isEnableDynamicCache()) {
File file = DynamicCacheLoader.getInstance().getResByUrl(mDynamicCacheFile, url);
if (file != null) {
CacheWebViewLog.d(String.format("from dynamic file: %s", url), mDebug);
String mimeType = MimeTypeMapUtils.getMimeTypeFromUrl(url);
InputStream inputStream = null;
try {
inputStream = new FileInputStream(file);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
WebResourceResponse webResourceResponse = new WebResourceResponse(mimeType, "",
inputStream);
return webResourceResponse;
}
}
po1arbear commented
这段代码是不是没用到
if (isEnableDynamicCache()) { File file = DynamicCacheLoader.getInstance().getResByUrl(mDynamicCacheFile, url); if (file != null) { CacheWebViewLog.d(String.format("from dynamic file: %s", url), mDebug); String mimeType = MimeTypeMapUtils.getMimeTypeFromUrl(url); InputStream inputStream = null; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException e) { e.printStackTrace(); } WebResourceResponse webResourceResponse = new WebResourceResponse(mimeType, "", inputStream); return webResourceResponse; } }
实现了,在这里