One of the reasons you should probably not have a persistent/global CGI
object is that
upon a "new" the CGI module reads in numerous environment variables and
setups up its
internal structures for that particular query. If $q (in $q=new CGI) was
persistent/global
you would possibly have the wrong internal data in $q for the current
request.

-----Original Message-----
From: Peter Pilsl [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 14 November 2001 9:19 AM
To: [EMAIL PROTECTED]
Subject: cgi-object not cacheable


One run of my script takes about 2 seconds. This includes a lot of
database-queries, calculations and so on.  about 0.3 seconds are used
just for one command: $query=new CGI;

I tried to cache the retrieved object between several requests by
storing to a persistent variable to avoid this long time, but it is
not cacheable. (in the meaning of : operations on a cached CGI-object
will just produce nothing)

This is not a problem of my persistent variables, cause this works
with many other objects like db-handles (cant use Apache::DBI cause
this keeps to many handles opened, so I need to cache and pool on my
own), filehandles etc.

any idea ?

thnx,
peter



--
mag. peter pilsl

phone: +43 676 3574035
fax  : +43 676 3546512
email: [EMAIL PROTECTED]
sms  : [EMAIL PROTECTED]

pgp-key available

Reply via email to