NAME

WWW::Session::Storage::Redis - Redis storage for WWW::Session

DESCRIPTION

Redis backend for WWW::Session

VERSION

Version 0.04

SYNOPSIS

This module is used for storing serialized WWW::Session objects in redis

Usage :

use WWW::Session::Storage::Redis;

my $storage = WWW::Session::Storage::Redis->new({ server => "127.0.0.1:6379" });
...

$storage->save($session_id,$expires,$serialized_data);

my $serialized_data = $storage->retrieve($session_id);

SUBROUTINES/METHODS

new

Creates a new WWW::Session::Storage::Redis object

This method accepts only one argument, a hashref that contains all the options that will be passed to the Cache::Redis module. The mandatory key in the hash is "server" which must be a scalar containing the redis server we want to use.

See Cache::Redis module for more details on available options

Croaks if the Cache::Redis module is not installed or if the "server" option is missing.

Example :

my $storage = WWW::Session::Storage::Redis->new({ server => "127.0.0.1:6379" });

save

Stores the session data in redis for the given number of seconds.

An expiration time of -1 means the session should never expire. Redis (through Cache::Redis) always stores keys with a TTL, so such sessions are stored with a ten-year TTL instead.

retrieve

Retrieves the session data for the given session id and returns the string containing the serialized data. Returns undef if the session does not exist or has expired (expiration is handled by redis itself).

delete

Completely removes the session data for the given session id and returns the result of the removal.

AUTHORS

Jeffrey Goff, <jeffrey.goff at evozon.com>

Horea Gligan, <horea.gligan at devnest.ro>

BUGS

Please report any bugs or feature requests to bug-www-session-storage-redis at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Session-Storage-Redis. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WWW::Session::Storage::Redis

You can also look for information at:

LICENSE

This is free software; you can redistribute it and/or modify it under the terms of:

The GNU General Public License, Version 3, June 2007

See http://www.gnu.org/licenses/gpl-3.0.html for the full license text.