Re: Re: DB_DataObject performance
| From: | Alan Knowles | Date: | Sun, 30 Oct 2005 04:39:48 +0000 |
| Subject: | Re: Re: DB_DataObject performance | ||
| References: | 1 2 3 | Groups: | php.pear.dev php.pear.general |
| Request: | Send a blank email to pear-dev+get-40347@lists.php.net to get a copy of this message | ||
caching between requests is asking for trouble (imagine if another fetch
changed the results).. - hence no direct support for this in dataobjects
(although it's trivial to add)
DataObjects supports limited caching withing the same query
(::staticGet() does this), by storing the result of a fetch in a global
variable.
In reality this is not a great way to do it, it is far better to
implement your own specific caching, after finding bottlenecks (hence
the debug code!). - either session based (for data you know is unlikely
to change), or global variables (for data that is unlikely to change,
but may....)
Regards
Alan
On Sat, 2005-10-29 at 22:33 +1000, Dan Rossi wrote:
> On 29/10/2005, at 4:31 PM, Alan Knowles wrote:
> >
> > if you are fetching the same data multiple times.. (rather than caching
> > the results..)
> >
> > Regards
> > Alan
> >
> >
>
> Does the results cache happen in mysql with SQL_CACHE or in DBDO or
> where may i ask ?
>
--
Alan Knowles <alan@akbkhome.com>