perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Burke <bbu...@lssi.net>
Subject Re: sharing data across SSI's (Executes)
Date Thu, 04 Sep 2003 14:28:42 GMT
Thanks everyone for the very useful comments & suggestions!

--
Brian

Andrew O'Brien wrote:

> If your code is using modules/namespaces (and or explicitly creating
> them) then by all means cache things in the namespace. I knew I should
> have mentioned that but ... :)
>
> I've sped things up by doing so - just make sure that your code can deal
> with the fact that the namespace may or may not contain cached values
> and that you properly expire/update the cache when appropriate. Code
> that was written for once-offs may need to be slightly rewritten to take
> persistence into account.
>
> --
> Andrew O'Brien
>
> > -----Original Message-----
> > From: Chris Allen [mailto:chris@cjx.com]
> > Sent: Thursday, 4 September 2003 10:38 AM
> > To: embperl@perl.apache.org
> > Subject: Re: sharing data across SSI's (Executes)
> >
> >
> > On Wed, Sep 03, 2003 at 09:41:02AM +1000, Andrew O'Brien wrote:
> > >
> > >
> > > Need 2: A request-specific global variable: store in $req.
> > eg $req->{key} = $value
> > >
> >
> > Is it reasonable to define a global by giving it its own
> > package? - eg:
> >
> > $mywebsite::cache={};
> >
> > $mywebsite::cache->{product_1}=$product_object;
> >
> >
> > Under mod_perl, this [apparently] creates a global variable that
> > lasts for the lifetime of the apache child - ideal for fast
> > caching of unchanging database objects.
> >
> > ..or am I looking for trouble and should be using
> > $req->{something}...???
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message