One note about caching in your viewer: What if your application needs to be cached, but only for certain users? The cache key of $_SERVER[‘REQUEST_URI’] works fine for that, but you might want to add a $userID to the key. Another thing to think about is that you shouldn’t be caching it all if the user logged in is an administrator (how annoying to develop on a site where you have to wait 20 minutes to clear the cache) 🙂

Just a few notes …