Class: Morpheus::RequestCache
- Inherits:
-
Object
- Object
- Morpheus::RequestCache
- Defined in:
- lib/morpheus/request_cache.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RequestCache
constructor
A new instance of RequestCache.
Constructor Details
#initialize(app) ⇒ RequestCache
Returns a new instance of RequestCache.
4 5 6 |
# File 'lib/morpheus/request_cache.rb', line 4 def initialize(app) @app = app end |
Class Method Details
.cache ⇒ Object
13 14 15 |
# File 'lib/morpheus/request_cache.rb', line 13 def self.cache @cache ||= {} end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/morpheus/request_cache.rb', line 8 def call(env) self.class.cache.clear @app.call(env) end |