2008年12月17日星期三

[fw-db] Caching the Table->find and Row->findDependantRowset methods

I'm working on optimizing my application and one of the approaches I
am using is to cache many of my queries.

I'd like to cache the results of Zend_Db_Table->find() and
Zend_Db_Row->findDependantRowset() [or ->findMyTable()] methods, but
I'd prefer to not have to wrap the same exact caching code around each
call to these. What's the best approach for me to override these
methods? Should I extend both the Zend_Db_Table_Abstract and
Zend_Db_Row_Abstract classes with a "parent" class for all my Table
and Row classes?

Or is there an easy way to do this? I was hoping for something a little easier.

Thanks,
-=Dan

没有评论: