The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dancer2::Session::Redis - Perl Dancer2 session provider for storing session data within key-value-store Redis.

VERSION

version 0.008

SYNOPSIS

In your config.yml:

    engines:
      session:
        Redis:
          # Browser cookie key for session id.
          cookie_name: "session_id"
          # Browser cookie expiration timeout (since last visit).
          cookie_duration: 86400
          # Redis session expiration timeout (since last visit).
          session_duration: 86400
          # Browser only sends cookie over https connection when set to true.
          is_secure: 0
          # Browser do not pass session cookie to JavaScript when set to true.
          is_http_only: 0
          # if you use TCP/IP:
          redis_server: "localhost:6379"
          # if you use UNIX/Linux sockets:
          redis_sock: "/path/to/sock"
          # (optional) Redis password used with auth:
          redis_password: "Very secure password 123!"
          # (optional) Reconnect up to 60 seconds (reconnect) every 5000 milliseconds (every):
          redis_reconnect: 60
          redis_every: 5000
          # (optional) Redis connection name (NOT the Redis database ID):
          redis_name: "my_connection_name"
          # (optional) Function called on Redis connect:
          redis_on_connect: "MyDancer2App::redis_on_connect"
          # (optional) Use serialization for storing values other than simple scalars with Redis:
          redis_serialization:
            # Use Sereal as serialization module:
            module: "Dancer2::Session::Redis::Serialization::Sereal"
            # Serialization module configuration:
            # Use snappy compression
            compression: "snappy"

DESCRIPTION

This Perl Dancer2 session provider for storing session data within key-value-store Redis.

It uses the Redis module to communicate internally with the Redis server. It also provides serialization features to store values which are more than just simple scalars (strings). By default there is no serialization used.

SEREAL

In order to use the supplied Sereal broker you have to install Sereal::Decoder and Sereal::Encoder. Both modules listed as runtime recommends with Dancer2::Session::Redis.

DEPENDENCIES

For some reason (need to be identified) Dancer2::Session::Redis requires Perl v5.13.2. Perl 5.12 and 5.10 aren't testet. They might work or not.

SEE ALSO

Dancer2
Redis
Sereal

AUTHOR

BURNERSK <burnersk@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016 by BURNERSK <burnersk@cpan.org>.

This is free software, licensed under:

  The MIT (X11) License