John has just published his TurboGears Caching Decorator. We’ve been using it on ShowMeDo for the last 6 weeks – our cpu usage dropped from 60%+ on our shared box down to <30%.
Currently we cache the main pages for 1 hour, these ought to be extended to ‘forever’ since I have a good cache-expire key for these pages. If I fixed this then I’d imagine our cpu usage would drop even further.
Getting it installed and running with the ‘cache using files’ version took about an hour. Developing some custom keys (one for each type of page) took another few hours, we’ve had no bugs and we’re darn impressed.
John developed this decorator for his Chrss and our ShowMeDo – we’re in debt to John for digging us out of our performance woes. Much obliged!