On Thu, 04 Nov 2004 09:43:56 -0500, Jason Purdy <suppressed> wrote:
> According to the docs:
>
> > Lazy loading is used to prevent expensive file system or database
> > calls from being made if the session is not needed during this
> > request. In other words, the Session object is not created until it
> > is actually needed. Also, the Session object will act as a singleton
> > by always returning the same Session object for the duration of the
> > request.
>
> In the cgiapp paradigm, though, we create the session object in the
> cgiapp_init() method, which is called for every request. So isn't the
> Session object created everytime, bypassing the savings of a plugin?
Not quite. We configure the session in the cgiapp_init method. But
the actual underlying CGI::Session module is not actually created or
instantiated until the first call to $self->session.
Calling $self->session_config does very little work. It does a few
simple checks to make sure the configuration info makes sense, and
stores the config options away for later use.
So I guess the lazy loading applies to the CGI::Session object, not
necesarily the CGI::Application::Plugin::Session.
--
Cees Hek
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.