This is somewhat useful, but it doesn't clear out all the cache files on a restart. Instead of removing the compreg.dat and xpti.dat files, simply replace all that code with the following two lines will re-register all components and remove fast-load data:
let XRE = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime); XRE.invalidateCachesOnRestart();
Thanks for creating this add-on. It is a great example of filling a gap in, IMO, essential missing housekeeping functionality.
Adding Thunderbird compatibility would be appreciated.
I have a very large profile. It simply isn't possible to prevent "stuff" from happening . Adequate maintenance instrumentation and tools are doable, Over reliance on "nuke and reinstall" common in the windows world is passing the buck. That bags the end user.Adding invalidateCachesOnRestart to the runtime api addresses the issue. Unfortunately. that's in gecko 2,0. FF4 may soon be ready for prime-time. I haven't checked yet, but think it take more time for a TB/gecko 2.0 release.
Great, but I made a small change that makes this even better:
in /chrome/content/overlay.js, add this after line 66: file = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("ProfD", Components.interfaces.nsIFile); file.append("extensions.cache"); if(file.exists()) file.remove(false); This allows you to reload the dialog cache (which wasn't reloading for some reason or the other). Please include this change!
I have found it to be very useful for my add-on development(proxilla). As any developer knows, you have to keep reloading the chrome constantly after making changes to your code to see the updates.
On a side note, as I was debugging my add-on, I noticed a warning for yours referencing the style of your statusbarpanel. Statusbarpanel-iconic is a class, not a style. Defining this correctly will allow you to use stylesheets to assign an image rather than using an image url.