Class: Colloquy::SessionStore::Redis
- Inherits:
-
Colloquy::SessionStore
- Object
- Colloquy::SessionStore
- Colloquy::SessionStore::Redis
- Defined in:
- lib/colloquy/session_store/redis.rb
Constant Summary collapse
- KEY_EXPIRY =
5 minutes
300
Constants inherited from Colloquy::SessionStore
Instance Method Summary collapse
Methods inherited from Colloquy::SessionStore
Constructor Details
This class inherits a constructor from Colloquy::SessionStore
Instance Method Details
#[](key) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/colloquy/session_store/redis.rb', line 9 def [](key) @store ||= redis_connection string = @store.get(normalized_key_name(key)) decode_value(string) end |
#[]=(key, value) ⇒ Object
4 5 6 7 |
# File 'lib/colloquy/session_store/redis.rb', line 4 def []=(key, value) @store ||= redis_connection @store.set(normalized_key_name(key), encode_value(value), KEY_EXPIRY) end |