[Catalyst] Regarding session handling

Nilson Santos Figueiredo Junior acid06 at gmail.com
Fri May 5 15:13:27 CEST 2006


For the first the today, I tried turning on DBIx::Class SQL output in
order to better understand a hard-to-catch issue.

However, I noticed something that seemed rather odd: for every HTTP
request there are three identical SELECTs being done like this:

SELECT me.id, me.expires, me.session_data FROM session me WHERE ( me.id = ? ): `
session:a6ba0482452aaa5dcfb97161196443cdf109be4c'
SELECT me.id, me.expires, me.session_data FROM session me WHERE ( me.id = ? ): `
session:a6ba0482452aaa5dcfb97161196443cdf109be4c'

And then, later on the request, there's yet antoher identical SELECT:

SELECT me.id, me.expires, me.session_data FROM session me WHERE ( me.id = ? ): `
session:a6ba0482452aaa5dcfb97161196443cdf109be4c'

I thought that Catalyst::Plugin::Session cached these things so that
the first time you get the session object is the only time where it
goes to the database but, apparently, this is not true. This should
present some performance issues.

Any pointers?

-Nilson Santos F. Jr.



More information about the Catalyst mailing list