Rated 3 out of 5 stars
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);
Thanks for the tip. I will add this change to next release of this addon.