I recently did some extensive work in PHP that needed a good template engine. I wound up using Smarty and it did the job just fine. In particular I wound up connecting Smarty to MySql for a cache store. Anyway, the following links are useful:
- Building a dynamic webpage using PHP, MySQL and Smarty – especially “stage 4”
- Smarty documentation, cache_handler_func()