Last year Ive made a patch to another CMS to transparently (through
__call mangling) cache method calls from model and controller objects,
instead of calling obj->method() you call obj->methodCached() and
'tada!', you get cached calls with filesystem or memcached backends.
In the process of building 2 sites with Silverstripe my mind started a
big "if..", so I tried to bring the same ideia to Silverstripe.
Trying to bring some brainstorm to it Im publishing an initial semi-
working (more on that later) patch (lot of syslog()-ing all over the
place) against trunk, already with 2 backends, filesystem-based and
memcached-based.
semi-working? Actually calling cached methods directly from templates
is broken, currently dont know why yet.
Included too is a little module with a test page of the patch.
Future direction of development:
a) implement a __call_static(), too, to be able to use cached calls of
Data_Object::get*.
b) investigate why currently I cant use cached calls directly from
templates.
Patch agains trunk and test module you can get at
http://sergio.bruder.com.br/silverstripe/
Sergio Bruder
http://sergio.bruder.com.br/