[Zope] Creating a List from a SQLMethod

Jim Fulton jim@digicool.com
Tue, 04 Jan 2000 09:52:14 -0500


Martijn Pieters wrote:
> 
> > If you have cacheing turned on for the query (cache
> > persistence time > time for zope to render page), zope should
> > pull the select
> > items from the cache and not actually rerun the query on the
> > database server. Therefore, the time saved by creating a list to reuse
> > is probably negligible.
> >
> > Also, the way you are doing it results in the list of select
> > items being sent in html multiple times, if the select is a long one
> > this will noticebly slow down the loading speed on the
> > browser for those with slow connections. An alternative would
> > be to create a
> > javascript array once and use a javascript function to create
> > the select lists on the browser to your hearts content.
> 
> Hmm.. I believe that dtml-in, like dtml-var,

You mean "like dtml-in".

> within one DTML
> method/document, caches retrieved names. So on call to dtml-in
> SQL_Method_x will actually call it, and a next reference within a DTML
> method will use a cached copy of that call.

No. The value is cached only within the tag.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.