kroodle / cordova-disable-http-cache

Cordova plugin to disable caching of HTTP requests and responses.
MIT License
8 stars 9 forks source link

Android API 33 #4

Open zommerfelds opened 2 years ago

zommerfelds commented 2 years ago

On API level 33 I was getting:

/usr/src/app/cordova/platforms/android/app/src/main/java/com/koenromers/cordova/DisableHttpCachePlugin.java:20: error: cannot find symbol ws.setAppCacheEnabled(false);

For now I just downgraded to 32.

AEiosApp commented 1 year ago

@zommerfelds I was able to fix it by removing outdated commend plugin file:

File: src-cordova/plugins/cordova-disable-http-cache/src/android/DisableHttpCachePlugin.java

Line #20 to remove ws.setAppCacheEnabled(false);

Such Method was removed, you can see Android Developer Document

pedro-ssantos commented 1 year ago

It hasn't been updated for 6 years. I don't think the problem will be resolved. Is there any other way to disable caching? There seems to be no other method other than the ws.setAppCacheEnabled(false);

zommerfelds commented 1 year ago

It seems like https://stackoverflow.com/a/74153072/3810493 provides a solution:

webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);

I haven't tried though. To be honest I'm not sure if I still need this extension. In the past I was having trouble refreshing my local builds after making a change.