Design Manager/File Manager File Caching (files uploaded/updated via API)


#1

Hi there,

We're having a really hard time trying to track the root cause of this issue. Here's a short example:

  1. A .js file is updated in our portal via this endpoint: https://developers.hubspot.com/docs/methods/templates/put_templates_template_id

  2. The file is correct & current when viewing it through the design manager after updating via the API.

  3. Pages using that file (every page/template/module on our site) are not seeing the updated .js file. They are still linking to an outdated (probably server-cached?) version of the file. Trying to cache-bust by adding params (?v=123456) does not work to solve the issue.

We've tried all possible client-side cache clearing options, and are going crazy trying to figure out the issue. Sometimes a CSS/JS change can be reflected within 30 seconds, sometimes we have to wait hours to see the change reflected in pages that are linking to a particular file. It's maddening to try to debug production code with a potential hours-long delay between file changes.

This isn't just JS files, obviously. It's CSS files as well, and our content team is also reporting that files uploaded to the File Manager can take hours to be correctly linked on pages where they are used.

Can anyone shed some light on this issue? Did something change in the way files/templates are cached server-side recently?


#2

Hi @Snuglas,

It's possible that updates can take a while to propagate throughout the CDN, but I wouldn't expect you to regularly see delays of multiple hours. Can you give me an example file you're seeing this issue with so that I can do some testing?