Are there any pitfalls to updating many Catalyst sessions at once using the
following code?
while ( my $session = $sessions->next ) {
my $session_key = 'session:' . $session->{'_id'};
my $session_data = $catalyst->get_session_data($session_key);
@{$session_data}{ keys %$data } = values %$data;
$catalyst->update_session_data($session_key, $session_data);
}
This is using MongoDB as the session store.
Obviously there is the small gap between retrieving the session data and
updating it, but are any traps here that I am not aware of?
Is there a better way to do this?
Thanks!
Jim
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/