Class: Shutl::Auth::Cache
- Inherits:
-
Object
- Object
- Shutl::Auth::Cache
- Defined in:
- lib/shutl/auth/authenticated_request.rb
Instance Method Summary collapse
-
#initialize ⇒ Cache
constructor
A new instance of Cache.
- #read(key) ⇒ Object
- #write(key, value) ⇒ Object
Constructor Details
#initialize ⇒ Cache
Returns a new instance of Cache.
6 7 8 |
# File 'lib/shutl/auth/authenticated_request.rb', line 6 def initialize @cache = {} end |
Instance Method Details
#read(key) ⇒ Object
10 11 12 |
# File 'lib/shutl/auth/authenticated_request.rb', line 10 def read(key) @cache[key] end |
#write(key, value) ⇒ Object
14 15 16 |
# File 'lib/shutl/auth/authenticated_request.rb', line 14 def write(key, value) @cache[key] = value end |