Class: Morpheus::RequestCache

Inherits:
Object
  • Object
show all
Defined in:
lib/morpheus/request_cache.rb

Class Method Summary collapse

Instance Method Summary collapse

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

.cacheObject



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