Name

pkit_session_setup — Returns Session setup arguments.

Synopsis

  # here a MySQL example:
  sub pkit_session_setup {
    my $model = shift;
    my $dbh = $model->dbh;
    return {
	session_lock_class => 'MySQL',
	session_store_class => 'MySQL',
	session_args => {
			Handle => $dbh,
			LockHandle => $dbh,
			},
	};
  }

  # this one is if you prefer PostgreSQL
  sub pkit_session_setup {
    my $model = shift;
    my $dbh = $model->dbh;

    my %session_setup = (
  	session_store_class => 'Postgres',
  	session_lock_class => 'Null',
  	session_serialize_class => 'Base64',
  	session_args => {
  			 Handle => $dbh,
                           IDLength => 32,
                           Commit => 0,
                          }
    );
    return \%session_setup;
  }

     

Description

Method must return a hash reference using Apache::SessionX session setup arguments. This hash reference should contain the following key/value pairs:

session_store_class
The object store class that should be used for Apache::SessionX session handling.
session_lock_class
The lock manager class that should be used for Apache::PageKit::Session session handling.
session_args
Reference to an hash containing options for the session_lock_class and session_store_class