Class: RedisMemory

Inherits:
SharedMemory show all
Defined in:
lib/sharedmem/redis.rb

Instance Attribute Summary

Attributes inherited from SharedMemory

#prefix

Instance Method Summary collapse

Methods inherited from SharedMemory

#[], #[]=, #push_prefix

Constructor Details

#initialize(host = "localhost", port = 6679) ⇒ RedisMemory

Returns a new instance of RedisMemory.



4
5
6
# File 'lib/sharedmem/redis.rb', line 4

def initialize(host="localhost", port=6679)
	@redis = Redis.new(:host => host, :port => port)
end

Instance Method Details

#disposeObject



7
8
# File 'lib/sharedmem/redis.rb', line 7

def dispose
end

#get(name) ⇒ Object



10
11
12
# File 'lib/sharedmem/redis.rb', line 10

def get(name)
	@redis.get name
end

#set(name, value) ⇒ Object



13
14
15
# File 'lib/sharedmem/redis.rb', line 13

def set(name, value)
	@redis.set name, value
end