How long does the custom functions JS file persist in Excel's cache for production add-ins?

118 views Asked by At

I have recently made a change to the custom functions JavaScript file, and uploaded it to our test environment. This change does not involve changing the signatures of any existing custom functions, nor does it add any new ones. The add-in is released and downloaded through AppSource. However, it is sideloaded for development. I used the techniques provided here to clear the cache.

  1. Install the Microsoft Edge DevTools.
  2. Open your add-in in the Office client.
  3. Run the Microsoft Edge DevTools.
  4. In the Microsoft Edge DevTools, open the Local tab. Your add-in will be listed by its name.
  5. Select the add-in name to attach the debugger to your add-in. A new Microsoft Edge DevTools window will open when the debugger attaches to your add-in.
  6. On the Network tab of the new window, select the Clear cache button.

This process worked for our staging environment for testing. However, the new version is released on our production servers, and our testing indicates that Excel is still running off of the old custom functions JS file. I assume it has been cached.

Here are the relevant headers sent from our server:

Cache-Control: no-cache, no-store, must-revalidate
Expires: 0
Pragma: no-cache

How long does this cache persist? Also, could I use HTTP headers or some other mechanism to control the cache's expiration?

0

There are 0 answers