Giter VIP home page Giter VIP logo

perl-plack-session-store-redisfast's Introduction

Build Status codecov

NAME

Plack::Session::Store::RedisFast - Redis session store.

DESCRIPTION

Default implementation of Redis handle is Redis::Fast; otherwise Redis.

May be overriden through "redis" param.

Default implementation of serializer handle is JSON::XS; otherwise Mojo::JSON or JSON.

May be overriden through "inflate" and "deflate" param.

SYNOPSIS

use Plack::Builder;
use Plack::Session::Store::RedisFast;

my $app = sub {
    return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
};

builder {
    enable 'Session',
        store => Plack::Session::Store::RedisFast->new;
    $app;
};

DESCRIPTION

This will persist session data using Redis::Fast or Redis.

This is a subclass of Plack::Session::Store and implements its full interface.

METHODS

new

Plack::Session::Store::RedisFast->new( %param );

Parameters:

  • redis

    A simple accessor for the Redis handle.

  • inflate

    A simple serializer, requires "deflate" param.

  • deflate

    A simple deserializer, requires "inflate" param.

  • encoder

    A simple encoder (encode/decode implementation), class or instance. JSON/utf8 by default.

  • prefix

    A prefix for Redis session ids. 'Plack::Session::Store::RedisFast:' by default.

  • expires

    An expires for Redis sessions. "ONE_MONTH" in Time::Seconds by default.

each_session

$store->each_session(sub {
    my ( $redis_instance, $redis_prefix, $session_id, $session ) = @_;
});

Enumerates all stored sessions using SCAN, see https://redis.io/commands/scan for limitations.

BUGS

All complex software has bugs lurking in it, and this module is no exception. If you find a bug please fill in GitHub issues.

AUTHOR

Akzhan Abdulin [email protected]

COPYRIGHT

Copyright 2017- Akzhan Abdulin

LICENSE

MIT License

perl-plack-session-store-redisfast's People

Contributors

akzhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.