Simple class to build and cache a combined file of
$cachedFile = Merge::javascript(array(
"/libs/libexample.js",
"/libs/libinputs.js",
"/libs/autocomplete.js",
"/js/validation.js"
));
<script type="text/javascript" language="javascript" src="<?php echo $cachedFile); ?>"></script>
With this plugin activated, there is no need to make a list of files to cache or even change the script tag to include the cached file, the plugin does it all.
$smarty = new Smarty();
$smarty->loadFilter('output', 'merge');