This should provide important insights so you get things "right".
It's based on how DNN 9 and DNN 10 work as of 2025-08.
Two Different Output Caching Scenarios
- Default: No DNN PageOutputCaching is enabled
- In this scenario, every page is rendered for every user
- This scenario also sets caching headers for each request, either to private or public, but without any other specs. Because of this, CloudFlare will not receive any TTL (
maxage
or s-maxage
)
- With DNN PageOutputCache (this changes the behavior in subtle but important ways)
- This scenario only applies, if the page output cache is enabled on both the server and a specific page.
- This scenario - if configured - will cache the HTML output for a specific page - usually in combination with url-parameters provided.
- This scenario will NOT set the proper caching headers at all, so upstream proxies/caches like CloudFlare will never receive a TTL (maxage, s-maxage)
Server Output Caching Settings Restrict All Options
DNN has a slightly unexpected behavior, where it will set some minimal output-caching headers by default on each request - but only if PageOutputCaching is not active.
These settings are global, meaning that they affect all sites on the same DNN.
IF the global settings are NOT set to public
, then it is impossible to set any other headers, such as maxage
. This seems to be a built-in behavior of the .net Framework. Once the setting has been applied (usually within the Default.aspx
of DNN), any code following that will not be able to "upgrade" the caching any more. So no code in any module or theme can then request for caching to be enabled or reconfigured.
Because of this, it's essential that the initial setting on the entire system is public
.