> -----Original Message-----
> From: Dan Rossi [mailto:[EMAIL PROTECTED] 
>
> I was talking view functionality of paging. It seems i also 
> need to get the count of results first in a different result 
> before running limit as usual. wonder if thats possible to be 
> cached so the count isnt called on each request. I may create 
> a wrapper for pear pager instead.

That's fine, it's a good idea.  You could also fetch the whole query
result set and persist it in a Zend_Cache object.  Then show slices from
it as needed.

I'm not in favor of putting any data-caching logic in Zend_Db.  Metadata
are okay to cache because they (should) change less frequently, but data
are volatile and subject to change.  ZF has a robust caching solution,
so you can use that when a given query result set is appropriate to
cache.  It should be an application design decision to know which data
are safe to cache, and what is the lifespan of cached data, etc.

Regards,
Bill Karwin

Reply via email to