Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

退出webview activity重新进入没走缓存 #194

Open
xumoyan opened this issue Aug 16, 2021 · 1 comment
Open

退出webview activity重新进入没走缓存 #194

xumoyan opened this issue Aug 16, 2021 · 1 comment

Comments

@xumoyan
Copy link

xumoyan commented Aug 16, 2021

退出webview,重新进入资源文件重新加载没走缓存。不知道是不是配置的问题,给看看。
WebViewCacheInterceptor.Builder builder = new WebViewCacheInterceptor.Builder(this);
builder.setCachePath(new File(this.getCacheDir(),"cache_path_name"))
.setDynamicCachePath(new File(this.getCacheDir(),"dynamic_webview_cache"))
.setCacheSize(10241024100)
.setConnectTimeoutSecond(20)
.setReadTimeoutSecond(20)
.setCacheType(CacheType.NORMAL);
builder.setAssetsDir("static");

    WebViewCacheInterceptorInst.getInstance().init(builder);
@outofmemory
Copy link

目前试下来 ... 好像只要reload,文件就没有走缓存

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants