Re: Re: DB_DataObject performance
| From: | Dan Rossi | Date: | Sun, 30 Oct 2005 05:26:34 +0000 |
| Subject: | Re: Re: DB_DataObject performance | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev php.pear.general |
| Request: | Send a blank email to pear-dev+get-40348@lists.php.net to get a copy of this message | ||
On 30/10/2005, at 3:39 PM, Alan Knowles wrote:
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 AlanObviously session based is client caching , and isnt good especially when the results change too :D Im looking into tinkering with shared memory i guess ? It would be nice if there was an application server backend for php too hehe.