The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Plack::Session::Store::Redis - Redis based session store for Plack apps.


Version 0.05


  use Plack::Builder;
  use Plack::Middleware::Session;
  use Plack::Session::Store::Redis;

  my $app = sub { ... };

  builder {
    enable 'Session', store => 'Redis';


This module will store Plack session data on a redis server. NOTE: only works with redis 1.2.x, which appears to be a limitation of


new( %params )

Create a instance of this module. No parameters are required, but there are a few defaults that can be changed. You can set the IP address of the server with the 'host' option, and the port with 'port'. By default all of the keys in Redis will be prefixed with "session", but this can be changed with the 'prefix' option. You can also provide an 'expires' option that will be used to set an expiration on the redis key.

fetch( $session_id )

Fetches a session object from the database.

store( $session_id, \%session_obj )

Stores a session object in the database.

remove( $session_id )

Removes the session object from the database.


Lee Aylward, <leedo at>


Please report any bugs or feature requests to bug-plack-session-store-redis at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


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

    perldoc Plack::Session::Store::Redis

You can also look for information at:



Copyright 2010 Lee Aylward.

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 for more information.