I am making changes to my main.html but they are never being reflected until I rename the file and update the reference. How can I clear the cache or make eel use my updated files?
See #79
I will add some stuff at some point to try and stop Chrome caching
I made a PR, is that what you had in mind?
I made the changes from the pull locally and put disable cache in the init per the example but I still see a cached stylesheet with an old version.
Any chance you guys can help me out with where eel is caching too? Is it the same cache as the local user browser? Id like to also clear it in Python either way. Thanks!
Is it possible that the file is already in your browser cache from before the change? If so this header technique won't be able to help. If your clear your browser cache manually then theoretically you'll always get fresh files from that point onward.
Well I am not certain exactly how eel functions with the cache, does it use the same cache as the local Chrome install the user would have if they launched Chrome.exe?
So I, or any user running my program, would eventually have new versions of these files. Pyinstaller unpacks them but if the same names, etc, are being passed into the browser, old versions of the GUI could be loaded into newer versions of the software because of caching.
Is there a way to tell eel to clear the cache it uses? If it is also the users local cache this could cause issues with other things, potentially. Users dont like it much when you clear their cache.
Is there perhaps a way to tell eel to use a different cache? The ChromeOption is --disk-cache-dir - is it possible to pass that? It would be easier to always specify a location to use for the eel cache, and then always clear that location on startup, to avoid any file version conflicts. *A folder in the script directory would suffice for a default, or it could be an override similar to what was proposed above. *I would think that most users of this software, as a program gui, wouldn't want it to share cache with anything else?
Is there perhaps a way to tell eel to use a different cache? The ChromeOption is --disk-cache-dir - is it possible to pass that?
Yes, you can pass this in chromeFlags option of options dictionary passed to eel.init()
You are right, I am thinking perhaps this should be the default
In "init" im seeing that it takes "path" and "allowed_extensions"... maybe that's not the right place?
Any chance you can show a quick example of eel init with ChromeOptions? I don't see the examples using this...
Most helpful comment
I made a PR, is that what you had in mind?