Understanding (and monitoring) the CF template cache
I've posted a comment there about how to measure and report on whether and when template cache misses occur. (Again, read his post for more on what a means.)
I would have posted it as a trackback from here, but I don't see how to do that in BlogCFC. So instead, I'm pointing you to it this way. :-)
To save you the trouble, if you just want to know how to measure it, here's what I wrote:
Thanks, Ashwin. More detail from Adobe folks is of course always welcome.But I do think it's useful to point out also how one can measure and report on whether and when template cache misses occur. There are at least two.
First, it's reported in the command-line CFSTAT tool as CP/Sec (for cache pops per second), and reports both a current and highwater mark. (Of course, you must enable CFSTAT support in the CF Admin, and the cfstat is in the cfusion/bin or cfusionmx/bin.)
It's also reported in the Windows Performance Monitor, by way of the ColdFusion/ColdFusion MX "performance object" counter called "Cache Pops/Sec" (again, assuming that you've enabled Perfmon support in the CF Admin).
With perfmon's ability to create logs and alerts, it should be easy for someone to create a mechanism to track if you ever have a non-zero value, which would suggest increasing the template cache size.
I meant also to mention that there is an old but still useful Allaire technote offering some more insight into caching, including using CFSTAT and more.






At least if one is on CF8 Enterprise or Developer edition, there is info in the CF8 monitor that can report (via Statistics > Request Statistics > Template Cache Status) both how large the template cache is, and what the hit ratio is.
It's not quite the same as the CFSTAT or perfmon reporting, but at least one could use the CF Admin API (on CF8 Enterprise or Developer) to access the info programatically to report/log/alert on it.