Class: Rack::Cache::Purge::Purger
- Inherits:
-
Object
- Object
- Rack::Cache::Purge::Purger
- Defined in:
- lib/rack/cache/purge/purger.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
-
#initialize(env) ⇒ Purger
constructor
A new instance of Purger.
- #purge(uris) ⇒ Object
Constructor Details
#initialize(env) ⇒ Purger
Returns a new instance of Purger.
10 11 12 |
# File 'lib/rack/cache/purge/purger.rb', line 10 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
8 9 10 |
# File 'lib/rack/cache/purge/purger.rb', line 8 def env @env end |
Instance Method Details
#purge(uris) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/rack/cache/purge/purger.rb', line 14 def purge(uris) normalize_uris(uris).map do |uri| key = key_for(uri) .purge(key) entitystore.purge(key) end end |