Class: RestrictCache::CacheSweeper

Inherits:
Object
  • Object
show all
Defined in:
lib/restrict_cache/cache_sweeper.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ CacheSweeper

Returns a new instance of CacheSweeper.



3
4
5
# File 'lib/restrict_cache/cache_sweeper.rb', line 3

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
# File 'lib/restrict_cache/cache_sweeper.rb', line 7

def call(env)
  @app.call(env)
ensure
  RestrictCache.clear
end