Method: Merb::Cache::ControllerInstanceMethods#cached_action?
- Defined in:
- lib/merb-cache/cache-action.rb
#cached_action?(options) ⇒ Boolean
Checks whether a cache entry exists
Parameter
- options<String,Hash>
-
The options that will be passed to #key_for
Returns
true if the cache entry exists, false otherwise
Example
cached_action?(:action => 'show', :params => [params[:page]])
59 60 61 62 |
# File 'lib/merb-cache/cache-action.rb', line 59 def cached_action?() key = Merb::Controller._cache.key_for(, controller_name, true) Merb::Controller._cache.store.cached?(key) end |