NAME
OpenInteract2::SessionManager::SQLite - Create sessions within a SQLite data source
SYNOPSIS
# In your server configuration file:
# Option 1: Specify the database name directly (use only when SQLite
# is only being used for sessions)
[session_info]
class = OpenInteract2::SessionManager::SQLite
impl_class = Apache::Session::SQLite
...
[session_info.params]
dbname = /home/httpd/oi/conf/sqlite_sessions
...
# Option 2: Specify a datasource
[session_info]
class = OpenInteract2::SessionManager::SQLite
impl_class = Apache::Session::SQLite
datasource = main
...
DESCRIPTION
Provide a '_create_session' method for OpenInteract2::SessionManager so we can use a SQLite data source as a backend for Apache::Session::SQLite.
This code is fairly untested under normal server loads and multiple processes. I do not know what the behavior of SQLite is with many concurrent reads and writes -- you might want to read the SQLite documentation about modifying the attributes of the data file so that every write is not synchronized with the filesystem.
METHODS
_validate_config( $session_config )
Ensure our configuration is properly defined. One of the following entries must be defined:
session_info.datasource
Specify the datasource to use. This should be defined just like any other OI2 datasource.
session_info.params.dbname
Specify the SQLite file used for serializing sessions.
No matter which option you choose the resulting SQLite file should already have the 'sessions' table defined.
_create_session( $session_config, [ $session_id ] )
Overrides the method from parent OpenInteract2::SessionManager, serializing sessions to and from a file named in the configuration.
SEE ALSO
COPYRIGHT
Copyright (c) 2001-2004 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Chris Winters <chris@cwinters.com>