NAME
Cache::RedisDB - RedisDB based cache system
DESCRIPTION
This is just a wrapper around RedisDB to have a single Redis object and connection per process. By default uses server redis://127.0.0.1, but it may be overwritten by REDIS_CACHE_SERVER environment variable. It transparently handles forks.
COMPATIBILITY AND REQUIREMENTS
Redis 2.6.12 and higher strongly recommended. Required if you want to use extended options in ->set().
SYNOPSIS
use Cache::RedisDB;
Cache::RedisDB->set("namespace", "key", "value");
Cache::RedisDB->get("namespace", "key");
SUBROUTINES/METHODS
redis_uri
Returns redis uri
redis_connection
Creates new connection to redis-server and returns corresponding RedisDB object.
redis
Returns RedisDB object connected to the correct redis server.
get($namespace, $key)
Retrieve $key value from the cache.
set($namespace, $key, $value[, $exptime])
Assigns $value to the $key. $value should be scalar value. If $exptime specified, it is expiration time in seconds.
set_nw($namespace, $key, $value[, $exptime])
Same as set but do not wait confirmation from server. If server will return error, there's no way to catch it.
del($namespace, $key1[, $key2, ...])
Delete given keys and associated values from the cache. $namespace is common for all keys. Returns number of deleted keys.
keys($namespace)
Return a list of all known keys in the provided $namespace.
ttl($namespace, $key)
Return the Time To Live (in seconds) of a key in the provided $namespace.
flushall
Delete all keys and associated values from the cache.
AUTHOR
binary.com, <rakesh at binary.com>
BUGS
Please report any bugs or feature requests to bug-cache-redisdb at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Cache-RedisDB. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Cache::RedisDB
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN