On Aug 10, 2007, at 5:42 PM, SamDonaldson wrote:
Aside from page caching...is there fragment caching? In other words...page caching doesn't really help when you have a header on your page with logged in users etc. You can't serve that page. Is there a way, like Rails, to fragment cache parts of your template?
You bet, you can cache any part of your templates (their fragments), and you can cache function calls as well. This extends not just throughout Mako, but into Pylons as well, where you can register functions in your controllers to be cached, like the example in the docs here: http://wiki.pylonshq.com/display/pylonsdocs/Caching+in+Templates+and +Controllers
In the cache object example, an entire function is handed to the caching system, which can handle any object/output that can be pickled.
Cheers, Ben
smime.p7s
Description: S/MIME cryptographic signature