The last time I talked about XSL I mentioned how powerful it is for caching. In this post I’m going to talk about how I use it and how you can easily implement it. In this post I’m going to talk a bit more about how I handle caching with XSL and PHP.
When I started the last iteration of Christian Lyrics I spent a lot of time looking for the best way to cache my data and templates. I wanted each page load to do as little as possible. Unfortunately most of the templating engines I saw had medicore cache control at best, and it was starting to look like I need to work on a new one. Then I found XSL. I had already fallen in love with SimpleXML and DOM, and with XSL I was able to utlize both for views. I’m not going into detail how my view class works, instead I’m just going to cover the caching techniques I use. So let’s get started!