1 package Plack::Session::Store;
5 use Plack::Util::Accessor qw[ _stash ];
8 my ($class, %params) = @_;
9 $params{'_stash'} ||= +{};
10 bless { %params } => $class;
14 my ($self, $session_id, $key) = @_;
15 $self->_stash->{ $session_id }->{ $key }
19 my ($self, $session_id, $key, $data) = @_;
20 $self->_stash->{ $session_id }->{ $key } = $data;
24 my ($self, $session_id, $key) = @_;
25 delete $self->_stash->{ $session_id }->{ $key };
29 my ($self, $session_id) = @_;
30 delete $self->_stash->{ $session_id }
34 my ($self, $session_id, $response) = @_;
46 Plack::Session::Store - Basic in-memory session store
54 =item B<new ( %params )>
60 =item B<fetch ( $session_id, $key )>
62 =item B<store ( $session_id, $key, $data )>
64 =item B<delete ( $session_id, $key )>
70 =item B<persist ( $session_id, $response )>
72 =item B<cleanup ( $session_id )>
78 All complex software has bugs lurking in it, and this module is no
79 exception. If you find a bug please either email me, or add the bug
84 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
86 =head1 COPYRIGHT AND LICENSE
88 Copyright 2009 Infinity Interactive, Inc.
90 L<http://www.iinteractive.com>
92 This library is free software; you can redistribute it and/or modify
93 it under the same terms as Perl itself.