
CGI::Session::Driver::redis - CGI::Session driver for redis

use strict;
use warnings;
use Redis;
my $redis = Redis->new();
my $session = CGI::Session->new( "driver:redis", $sid, { Redis => $redis,
Expire => 60*60*24 } );

This backend stores session data in a persistent redis server, with the ability to specify an expiry time in seconds.

The following options may be passed to the constructor:
ExpiryWhich is the time to expire the sessions, in seconds, in inactivity. Supplying a value of "0" equates to never expiring sessions.
PrefixA string value to prefix to the session ID prior to redis storage. The default is "session".
RedisA Redis object which will be used to store the session data within.


Steve Kemp <steve@steve.org.uk>

Copyright (C) 2010 Steve Kemp <steve@steve.org.uk>.
This library is free software. You can modify and or distribute it under the same terms as Perl itself.

Initialise our driver, ensuring we received a 'Redis' attribute.
Generate a key, by joining a prefix and the session identifier, then store the session underneath that key.
Generate a key, by joining a prefix and the session identifier, then return the session information stored under that key.
Generate a key, by joining a prefix and the session identifier, then remove that key from the Redis store.
