3
I think that's triggered by calling one of the methods XoopsTpl::display or XoopsTpl::fetch. The class XoopsTpl is defined in class/template.php, and is derived from the class Smarty, which is defined in class/smarty/Smarty.class.php. Smarty generally keeps track of whether a template needs to be compiled (into templates_c/) and/or whether the cache needs to be generated (in cache/). The class XoopsTpl overrides some of Smarty's default behavior.