Class: Rack::PageSpeed::Store::Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/pagespeed/store/redis.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Redis

Returns a new instance of Redis.



8
9
10
# File 'lib/rack/pagespeed/store/redis.rb', line 8

def initialize *args
  @client = Redis.new *args
end

Instance Method Details

#[](key) ⇒ Object



12
13
14
# File 'lib/rack/pagespeed/store/redis.rb', line 12

def [] key
  @client.get key
end

#[]=(key, value) ⇒ Object



16
17
18
# File 'lib/rack/pagespeed/store/redis.rb', line 16

def []= key, value
  @client.set key, value
end