Egg::Model::Session::Base::FileCache - Session management by Cache::FileCache.
package MyApp::Model::Sesion; __PACKAGE__->config( filecache => { cache_root => MyApp->path_to('cache'), namespace => 'sessions', cache_depth => 3, default_expires_in => (60* 60), }, ); __PACKAGE__->startup( Base::FileCache ID::SHA1 Bind::Cookie );
The session data is preserved by using Cache::FileCache.
And, 'Base::DBI' is added to startup of the component module generated with Egg::Helper::Model::Session. Default is this module.
There is no Store system component needing because Cache::FileCache can treat HASH well.
__PACKAGE__->startup( Base::FileCache ID::SHA1 Bind::Cookie );
'filecache' key is set to config of the session component module.
__PACKAGE__->config( filecache => { ....... }, );
All set items are passed to Cache::FileCache.
see Cache::FileCache.
Because most of these methods is the one that Egg::Model::Session internally uses it, it is not necessary to usually consider it on the application side.
The Cache::FileCache object is returned.
The session data obtained by received SESSION_ID is returned.
When SESSION_ID is not obtained, it acquires it in 'Session_id' method.
New session data is preserved.
SESSION_DATA is indispensable.
The same processing as 'insert' is done.
The session data is deleted.
SESSION_ID is indispensable.
$session->delete('abcdefghijkemn12345');
Egg::Release, Egg::Model::Session, Egg::Model::Session::Manager::Base, Egg::Model::Session::Manager::TieHash, Egg::Model, Cache::FileCache,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Plugin::SessionKit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Plugin::SessionKit
CPAN shell
perl -MCPAN -e shell install Egg::Plugin::SessionKit
For more information on module installation, please visit the detailed CPAN module installation guide.