<<

NAME

Catalyst::Plugin::Session::Store::CHI - The great new Catalyst::Plugin::Session::Store::CHI!

VERSION

Version 0.10

SYNOPSIS

    use Catalyst qw/Session Session::Store::CHI::File Session::State::Foo/;

    MyApp->config->{'Plugin::Session'} = {
        <chi args>
    };

    # ... in an action:
    #     $c->session->{foo} = 'bar'; # will be saved
}

METHODS These are implementations of the required methods for a store. See Catalyst::Plugin::Session::Store.

get_session_data

get session data from chi

store_session_data

store session data into chi

delete_session_data

delete_expired_sessions

unsupported

get_and_set_session_data This is the optional method for atomic write semantics. See Catalyst::Plugin::Session::AtomicWrite.

setup_session

Sets up the session cache file.

CONFIGURATION

    $c->config('Plugin::Session' => {
        chi_args =>  {
            expires => 1234,
            driver => 'Memory',
            global => 1
        }
    });

    $c->config('Plugin::Session' => {
        chi_args =>  {
            driver => 'File',
            root_dir => '/path/to/root'
        }
    });


    $c->config('Plugin::Session' => {
        chi_args =>  {
            driver => 'FastMmap',
            root_dir => '/path/to/root',
            cache_size => '1k'
        }
    });

    $c->config('Plugin::Session' => {
        chi_args =>  {
            driver  => 'Memcached::libmemcached',
            servers => [ "10.0.0.15:11211", "10.0.0.15:11212" ],
            l1_cache => { driver => 'FastMmap', root_dir => '/path/to/root' }
        }
    });

    $c->config('Plugin::Session' => {
        chi_args =>  {
            driver  => 'DBI',
            dbh => $dbh
        }
    });

    $c->config('Plugin::Session' => {
        chi_args =>  {
            driver  => 'BerkeleyDB',
            root_dir => '/path/to/root'
        }
    });

chi_class

Use this CHI subclass.

chi_args

Accepts any valid option from "CONSTRUCTOR" in CHI

Other Options

Accepts any valid option from "CONFIGURATION" in Catalyst::Plugin::Session

SEE ALSO

Catalyst, Catalyst::Plugin::Session, CHI.

AUTHOR

Inverse inc. <info@inverse.ca>

COPYRIGHT

Copyright (C) 2005-2015 Inverse inc.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

<<