- PUBLIC ATTRIBUTES
- PUBLIC METHODS
- SEE ALSO
- COPYRIGHT AND LICENSE
ShardedKV::Storage::Redis - Abstract base class for storing k/v pairs in Redis
# use a subclass instead
This class consumes the ShardedKV::Storage role. It is an abstract base class for storing key-value pairs in Redis. It does not actually implement the
set() methods and does not impose a Redis value type. Different subclasses of this class are expected to represent different storages for distinct Redis value types.
A hostname:port string pointing at the Redis for this shard. Required.
Redis object that represents the connection. Will be generated from the
redis_connect_str attribute and may be reset/reconnected at any time.
Base key expiration time to use in seconds. Defaults to undef / not expiring at all.
Additional random jitter to add to the expiration time. Defaults to 0. Don't set to undef to disable, set to 0 to disable.
Indicates the number of the Redis database to use for this shard. If undef/non-existant, no specific database will be selected, so the Redis server will use the default.
Implemented in the base class, this method deletes the given key from the Redis shard.
Not implemented in the base class. This method is supposed to fetch a value back from Redis. Beware: Depending on the
ShardedKV::Storage::Redis subclass, the reference type that this method returns may vary. For example, if you use
ShardedKV::Storage::Redis::String, the return value will be a scalar reference to a string. For
ShardedKV::String::Redis::Hash, the return value is unsurprisingly a hash reference.
The counterpart to
get. Expects values as second argument. The value must be of the same reference type that is returned by
# vim: ts=2 sw=2 et
Steffen Mueller <email@example.com>
Nick Perez <firstname.lastname@example.org>
This software is copyright (c) 2013 by Steffen Mueller.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.