Interesting note: cfcache doesn't output its content

Sorry to babble on about the cfcache, but just moving our caching away from ancient cf_cache to Lucee’s built-in cfcache and have made some observations here about differences and behaviours.

Thus, thisi is not a bug report per se, but a note for anyone else pulling their hair out with this.

So, cfcache itself isn’t “outputting tag”, apparently. Meaning that this code will be a blank one when outputting it:

<cfsetting enablecfoutputonly=true>
<cfoutput>
<html>
<body>
..
<h1>Do stuff</h1>
..
</cfoutput>
--some queries, etc--
<cfcache action="content" timespan="#creatimespan(1,0,0,0)#" key="main-output-v1-#firstname#" directory="/cache/">
 <cfoutput>Just testing, #firstname#!</cfoutput>
</cfcache>
..
<cfoutput>
</body>
</html>
</cfoutput>

So, yeah, it totally makes sense and is logical, but man, I lost at least half of my hair with this one. So, you need to put cfoutput tags around the cfcache in order to output its content, otherwise its portion will be blank :slight_smile:

2 Likes