[Catalyst] Page fragment caching

Tomas Doran bobtfish at bobtfish.net
Wed Jan 20 20:02:27 GMT 2010

On 20 Jan 2010, at 09:37, Tobias Kremer wrote:
> b) there is something like page fragment caching which allows me to
> not cache DBIC objects but generated HTML in an elegant way (without
> having to wrap each TT code snippet with cache get/set calls)?

As noted by already, serving ESI is a good way to do this. I'd  
recommend Catalyst::View::Component::SubInclude for this.

It would be perfectly possible (and in fact quite easy) to write a  
backend for that which cached the fragment for you...

So you can get the best of all worlds - use SubRequest in development,  
cache the fragments now for production, and when you come to scale a  
lot - you can use varnish/ESI straight away, just by changing config -  
rather than needing to rework parts of your app. :)


More information about the Catalyst mailing list