Class: ActiveEndpoint::Routes::Cache::Store
- Inherits:
-
Object
- Object
- ActiveEndpoint::Routes::Cache::Store
- Defined in:
- lib/active_endpoint/routes/cache/store.rb
Instance Method Summary collapse
- #allow?(rule) ⇒ Boolean
-
#initialize ⇒ Store
constructor
A new instance of Store.
- #unregistred?(probe) ⇒ Boolean
Constructor Details
#initialize ⇒ Store
Returns a new instance of Store.
9 10 11 12 13 |
# File 'lib/active_endpoint/routes/cache/store.rb', line 9 def initialize @store = ActiveEndpoint::Routes::Cache::Proxy.build(ActiveEndpoint.cache_store_client) @logger = ActiveEndpoint.logger @notifier = ActiveSupport::Notifications end |
Instance Method Details
#allow?(rule) ⇒ Boolean
15 16 17 |
# File 'lib/active_endpoint/routes/cache/store.rb', line 15 def allow?(rule) rule_cache_allow?(rule) && storage_cache_allow?(rule) end |
#unregistred?(probe) ⇒ Boolean
19 20 21 22 |
# File 'lib/active_endpoint/routes/cache/store.rb', line 19 def unregistred?(probe) path = probe[:path] read(path).present? ? false : write(path, :unregistred) end |