No commit activity in last 3 years
No release in over 3 years
Returns a namespaced version of redis
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

namespaced_redis

The namespaced_redis gem is a wrapper gem for the standard redis gem that prepends a value to each key that is written and read from redis. It is used to seperate out logical sections of data while keeping your app clean.

Usage:

redis_options = {:host => "localhost", :port => 6379}
@redis = NamespacedRedis.new(redis_options, "your-unique-id")

redis_options is a hash that is passed into the redis object and is unaltered as it is passed through, so please refer to the redis gem for details of this. The second parameter is a unique id set by you, I would suggest that this contains a unique id for the data (possibly the id of the object that the data relates to) and also the version of your application, as the data in redis may remain after an upgrade and may be in an invalid format.