silverstripe/sapphire — pull request #469 by stojg (2012-05-20 01:23:22+00:00)
Title: Cached datalist and database

This is a proof of concept on how to cache Database queries. It is mergable but far from advisable at this stage. This pull request is a good base for discussions about implementation and scope.

It relies on Zend_Cache to cache the queries
It relies on another Zend to cache the LastEdited for tables (similar to Aggregate, but the future of Aggregate seems uncertain, so I've duplicated the functionality)

For the cache to invalidate properly it relies on that DB::flush_event() is called on changes, example can be found in DataObject::flushCache();