NAME

MojoX::Session::Store::Redis - RedisDB Store for MojoX::Session

VERSION

Version 0.01

SYNOPSIS

use MojoX::Session::Store::Redis;

my $session = MojoX::Session->new(
	tx        => $tx,
	store     => MojoX::Session::Store::Redis->new({
		server	=> '127.0.0.1:6379',
		prefix	=> 'mojo-session',
		db_num	=> 0,
	}),
	transport => MojoX::Session::Transport::Cookie->new,
);

# see doc for MojoX::Session

DESCRIPTION

MojoX::Session::Store::Redis is a store for MojoX::Session that stores a session in a Redis database.

ATTRIBUTES

MojoX::Session::Store::Redis implements the following attributes.

redis

my $db = $store->redis;

Get and set MojoX::Redis object.

redis_prefix

my $prefix = $store->prefix;

Get and set the Key prefix of the stored session in Redis. Default is 'mojo-session'.

redis_db_num

my $db_num = $store->db_num;

Get and set the DB Number to use in Redis DB. Default is 0.

METHODS

MojoX::Session::Store::Redis inherits all methods from MojoX::Session::Store, and few more.

new

new uses the redis_prefix and redis_db_num parameters for the Key name prefix and the DB number respectively. All other parameters are passed to MojoX::Redis-new()>.

create

Insert session to Redis.

update

Update session in Redis.

load

Load session from Redis.

delete

Delete session from Redis.

AUTHOR

BlueT - Matthew Lien - 練喆明, <BlueT at BlueT.org>

BUGS

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

CONTRIBUTE

Main: bzr repository etc at https://launchpad.net/p5-mojox-session-store-redis.

A copy of the codes: git repository etc at https://github.com/BlueT/p5-MojoX-Session-Store-Redis.

SUPPORT

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

perldoc MojoX::Session::Store::Redis

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2011 BlueT - Matthew Lien - 練喆明.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 170:

Non-ASCII character seen before =encoding in '練喆明,'. Assuming CP1252