Static content macro cache - unpredicatable

Dear community,

according to the docs Confluence is using a cache for the results of static content macros. I’m pretty confident that I’m sending the correct headers back but results are not as expected. I expected that the initial load time is higher followed by significantly shorter load times until the cache has expired. However this is not always the case. Sometimes the cache works right away sometimes it takes many reloads before caching seems to start.

Observed example for a page with 50 static content macros: 14s, 14s, 13s, 15s, 13s, 4s, 4s, 4s,…
Expected: 14s, 4s, 4s, 4s…

This does not only happen with my plugin but also with other plugins using static content macros (LatexMath, Multi Excerpt etc.).

What is going on in the background and is there a possible to influence this?

Thank you

Andreas

You are correct, it will be behaving weirdly in production. The bottom line is this, the HTTP cache on our end is specific to the node that your request is currently running on. This was not an issue until a recent platform change that we made that reduced the effectiveness of the cache.

The issue that you want to comment on and vote on is here: [CE-773] - Ecosystem Jira

Cheers!

Dear Robert,

thank you for the quick and precise answer.

Andreas