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

Application cache max size #4991

Closed
Wujerry opened this issue Jun 16, 2016 · 7 comments
Closed

Application cache max size #4991

Wujerry opened this issue Jun 16, 2016 · 7 comments
Assignees

Comments

@Wujerry
Copy link

Wujerry commented Jun 16, 2016

OS: window XP/7/10
nwjs: 0.14/0.15

  • Any way to change Application cache max size?
  • nw.App.clearCache()did not clear Application cache

I considered pack my app , but my app is high frequency updated

thanks

@Wujerry Wujerry changed the title Application cache max size? Application cache max size Jun 16, 2016
@rogerwang rogerwang self-assigned this Jun 21, 2016
@rogerwang
Copy link
Member

Will fix the limit and clearCache. For now you can use '--unlimited-storage' to workaround it.

@Wujerry
Copy link
Author

Wujerry commented Jun 28, 2016

##Test

  • OS: windows10 x64
  • Version: nwjs-sdk-v0.15.5-win-ia32

##Result
App.clearAppCache(manifest_url) works fine

thank for your time

rogerwang added a commit that referenced this issue Jun 28, 2016
@Yonezpt
Copy link

Yonezpt commented Aug 29, 2016

I don't understand what should be inserted as manifest_url, does it have to be a direct path to the package.json file like "chrome-extension:https://" + chrome.runtime.id + "/package.nw/package.json"? The wiki does not explain this part and using the path I mentioned does not appear to make any difference, the cache folder decrease its size.

@Wujerry
Copy link
Author

Wujerry commented Aug 30, 2016

@Yonezpt I did this in my app:
nw.App.clearAppCache(window.location.origin+'/app.manifest');

@Yonezpt
Copy link

Yonezpt commented Aug 30, 2016

I don't think that that is even a valid manifest link, are you certain that it is working correctly? Does it also work if you change "/app.manifest" to "/manifest_url"? Where did you find that url? Because I cannot find any mention of "/app.manifest" being a valid manifest path anywhere.
I get no errors trown for any type of string I use and since there is no callback option I can never tell if a cleanup actually happened.
I just tried nw.App.clearAppCache("asdasdasd") and there was no difference from using your url, no errors and no size reduction in the cache folder either.

@Wujerry
Copy link
Author

Wujerry commented Aug 30, 2016

@Yonezpt
<html ng-app="app" manifest="app.manifest" >
app.manifest is the name of your manifest file.

You can see this in chrome developer tool console:
Document was loaded from Application Cache with manifest http:https://192.168.4.61/app.manifest

@Yonezpt
Copy link

Yonezpt commented Aug 30, 2016

I don't think that the manifest you are referring to is the same manifest that is suppose to be linked. The one you are using is mainly for offline browsing, which is deprecated: https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache

This is the actual manifest that I assume should be used with clearAppCache : http:https://docs.nwjs.io/en/latest/References/Manifest%20Format/

Which is usually named package.json. @rogerwang or @ghostoy could either of you clarify this whenever you have some free time? Exactly which manifest_url should be passed to nw.App.clearAppCache?

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

No branches or pull requests

3 participants