All my application 's objects have a private attribute that contains a Zend_Db_Row_abstract instance, which encapsulate the row in the Db, represented by the instance. The object do the mapping of himself. I've no data mapper for the moment (maybe one day). That's nearly the RoR's active record pattern.
ex :
class User
{
private $_tableUser; /* instance of Zend_Db_Table User (for method like getAll or getByID) */
   private $_rowTraduction;   /* instance of Zend_Db_Table_Row User */

public function save()
{
   this->_rowTraduction->save();
}

}


Many of my scripts are list of users, so i'm wanting to implement a caching system of that list of user. I can cache the list as a page using the zend_cache page frontend, but all my lists would have is own cache. That's not optimum because they lists the same users. So i was trying to cache my collections of user's object instead of list page. Also, all my lists will be using the same cache system.

Chris Weldon a écrit :
On Thu, Jan 29, 2009 at 10:01 AM, Sébastien Couragier - DoYouSoft
<[email protected]> wrote:
Is it impossible to cache a Zend_Db_Table_Abstract ?

Why are you wanting to?

Reply via email to