Skip to content

An always up-to-date local memory hash for Ruby synchronized against Redis.

Notifications You must be signed in to change notification settings

jvaill/redis-replicated-hash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An always up-to-date local memory hash for Ruby and Redis

DESCRIPTION

Redis Replicated Hash is a simple Ruby library for synchronizing a local memory hash against a Redis server.

To achieve this, Redis replication is implemented.

USAGE

Simply create an instance of RedisReplicatedHash optionally passing the hostname and port of the server. The third parameter is a boolean indicating whether the call should block until the database is fully loaded into memory.

require './redis-replicated-hash'

replicated_hash = RedisReplicatedHash.new
puts "Replicated hash is running, and probably synchronizing right now!"

puts "Enter the key to retrieve:"
while line = gets
  puts "Retrieved value is:"
  p replicated_hash.keys[line[0..-2]]
end

About

An always up-to-date local memory hash for Ruby synchronized against Redis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages