Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (24 sloc) 352 Bytes
class MockRedis
def setex key, ttl, value
set key, value
expire key, ttl
end
def set key, value
values[key] = value
end
def get key
values[key]
end
def exists key
values.has_key? key
end
def del key
values.delete key
end
def expire key, ttl
end
private
def values
@values ||= {}
end
end
Jump to Line
Something went wrong with that request. Please try again.