CHI::Driver::Redis(3pm)

CHI::Driver::Redis3pm

Redis driver for chi

Usage

    use CHI;
    my $foo = CHI->new(
        driver => 'Redis',
        namespace => 'foo',
        server => '127.0.0.1:6379',
        debug => 0
    );

Overview

A CHI driver that uses "Redis" to store the data. Care has been taken to not have this module fail in fiery ways if the cache is unavailable. It is my hope that if it is failing and the cache is not required for your work, you can ignore its warnings.

Technical details

Namespaces.

Redis does not have namespaces. Therefore, we have to do some hoop-jumping.

Namespaces are tracked in a set named "chinamespaces". This is a list of all the namespaces the driver has seen.

Keys in a namespace are stored in a set that shares the name of the namespace. The actual value is stored as "$namespace||key".

Encoding

This CHI driver uses Redis.pm. Redis.pm by default automatically encodes values to UTF-8. This driver sets the Redis encoding option to undef to disable automatic encoding.

Options

"redis"

option for the constructed "Redis" object

"redis_options"

for hash of options to the "Redis" constructor

Other options, including "server", "debug", and "password" are passed to the "Redis" constructor.

Attributes

redis

Contains the underlying "Redis" object.

Contributors

Ian Burrell, "<[email protected]>"

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9
  2. 10
  3. 11
  4. 12–13

Author

Cory G Watson, "<gphat at cpan.org>"

From libchi-driver-redis-perl 0.10-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.