Method: Merb::Cache::ControllerInstanceMethods#cached?
- Defined in:
- lib/merb-cache/cache-fragment.rb
#cached?(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?("my_key")
14 15 16 17 |
# File 'lib/merb-cache/cache-fragment.rb', line 14 def cached?() key = Merb::Controller._cache.key_for(, controller_name) Merb::Controller._cache.store.cached?(key) end |