[Catalyst] save session data
Fernan Aguero
fernan at iib.unsam.edu.ar
Fri Feb 9 19:51:11 GMT 2007
Hi!
I'm currently using the Session, Session::Store::DBIC,
and Session::State::Cookie plugins to track session data for
each user.
One of the things I'm doing is storing user queries into the
session:
$c->session->{queries} = {
1 => { deeper data structure here },
2 => { ... },
3 => { etc. }
};
Now, these queries are only preserved during the session.
I'd like to offer the possibility of saving this data and
make it available across sessions. I already thought about
setting the 'expires' value of the session to some extremely
high value, as mentioned in the Session plugin docs, but I
don't quite like the idea.
I prefer to have this data associated with a userid, and not
with a sessionid, so that the same user on two different
machines/browsers can get at her/his queries. So I've know
added authentication to my catalyst app, and I have already
login/logout functionality working (Authentication,
Authentication::Store::DBIC, Authentication::Credential::Password,
Authorization::Roles).
Now, if I want to have this session data stored into a
diffent db table and with additional data, I imagine I'd have
to write my own Session-Store-DBIC workalike ... or perhaps
it's easier to just dump the structure, encode it somehow
(base64?) and store this as text?
Anyone went that path? Perhaps this wheel is already
available from cpan? :)
Thanks for any pointer,
Fernan
More information about the Catalyst
mailing list