User:AnomieBOT/source/AnomieBOT/API/Cache/Redis.pm/doc

< User:AnomieBOT‎ | source‎ | AnomieBOT‎ | API‎ | Cache‎ | Redis.pm

NAME edit

AnomieBOT::API::Cache::Redis - AnomieBOT API cache using redis

SYNOPSIS edit

 use AnomieBOT::API::Cache;
 
 my $cache = AnomieBOT::API::Cache->create( 'Redis', $optionString );
 $cache->set( 'foo', 'bar' );
 say $cache->get( 'foo' );  # Outputs "bar"

DESCRIPTION edit

AnomieBOT::API::Cache::Redis is an implementation of AnomieBOT::API::Cache using redis for storage.

METHODS edit

In addition to the methods inherited from the base class, the following are available.

AnomieBOT::API::Cache::Redis->new( $optionString )
Creates a new AnomieBOT::API::Cache::Redis object. The option string is a semicolon-separated list of key-value pairs; if the value must contain a semicolon or backslash, escape it using a backslash.
Recognized keys are:
server
Server address, of the form "host:port" for network connections, or "/path/to/socket" for Unix domain socket connections.
namespace
Prefix all keys with this string.
noreply
Value should be 0 or 1; the default is 1. When a method is called in a void context and this is set, a reply will not be waited for.
max_size
Maximum size of a data item, after compression. Larger data items will cause setting functions to return undef. Set 0 to disable. Default is 0.
encrypt
Encrypts the data before sending it to memcached, using the specified value as the encryption key. Default is empty, no encryption.
pass
Password to send as an "AUTH" command.
verbose
Output errors to stdout.

COPYRIGHT edit

Copyright 2013 Anomie

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.