[Zope] SQL Methods being called more than once

Tony McDonald tony.mcdonald@ncl.ac.uk
Thu, 2 Mar 2000 16:14:56 +0000


At 8:13 am -0500 2/3/00, Jatwood@bwanazulia.com wrote:
>I have a page that has the same SQL Method called a few times....
>
><dtml-in sqlMethod query=start_query>
>Do some stuff
></dtml-in>
>
>
><dtml-in sqlMethod query=start_query>
>Do some more stuff
></dtml-in>
>
>
><dtml-in sqlMethod query=start_query>
>Do some more stuff
></dtml-in>
>
>
>Does anyone know the inner working well enough to tell me whether or 
>not Zope actually makes two separate calls to the database or 
>whether it makes one caches it and uses the results twice?
>
>If you know and would like to expand on how Zope deals with caching 
>SQL data that would be great I am trying to optimize my Zope 
>installation and don't want to tax the database.
>

I posted a message about this this morning. In effect, yes you can 
use caching and it is veery fast (one second and subsequent renders). 
For your document, I think you'll find it will speed up by a factor 
of how many times the ZSQL method is called...
tone.
ps it's the 'Advanced' tag. Put something in the 'cache results for n 
seconds' box
------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2