Reliably Clear Desktop Excel Addin Cache During Dev
I'm struggling to work on a custom functions Office JS addin because Desktop Excel keeps using old copies of the files. (I am, of course, stuck working on a Desktop-specific bug.)
- I've cleared
- I've cleared browser cache (though Excel is using slightly different version of Edge than my browser version, v100 instead of v99).
How do I get Desktop Excel to reliably load up-to-date files?
To give you an idea, I've done this sequence repeatedly:
main.htmlto have an observable side effect (requesting a server resource with name "A" for instance).
- Eventually got to the point where Excel was using that version of the file.
- Changed the file to show a different side effect (requesting "A2" instead).
- Closed Excel
- Cleared browser cache (though again, not clear it's the same one)
- Ran the addin
- Saw it run the old file
- Opened devtools (this addin has a taskpane, so right-click and choose Inspect)
fetch("/main.html").then(r => r.text()).then(console.log)and see the updated version of
main.html(so, if it's browser cache, it's been updated)
- Close Excel
- Stop and restart the web server (to clear its cache; it's really basic, only has memory cache)
- Open Excel, run the addin, and still see the old side-effect (even though the web server shows a get for
- Repeating the
fetchthing gets the latest version; not a browser or server caching issue. It's Excel itself.
This seems really basic and fundamental: Load the latest version of the resource. What am I missing?
You might reasonably wonder why I'm not using the debugging features of the custom functions addin project created by
yo office. The answer is: I can't seem to get them working reliably, either: https://github.com/OfficeDev/office-js-docs-pr/issues/3355. (Not my finest hour!) I can on an older project scaffolded with a much older version of the tool, but not with the latest.
Sign in to comment