Module: Mize
- Extended by:
- Configure
- Defined in:
- lib/mize.rb,
lib/mize/memoize.rb,
lib/mize/railtie.rb,
lib/mize/version.rb,
lib/mize/configure.rb,
lib/mize/global_clear.rb
Defined Under Namespace
Modules: CacheMethods, Configure, Memoize, Reload Classes: DefaultCache, Railtie
Constant Summary collapse
- MUTEX =
Mutex.new
- VERSION =
Mize version
'0.3.5'- VERSION_ARRAY =
:nodoc:
VERSION.split('.').map(&:to_i)
- VERSION_MAJOR =
:nodoc:
VERSION_ARRAY[0]
- VERSION_MINOR =
:nodoc:
VERSION_ARRAY[1]
- VERSION_BUILD =
:nodoc:
VERSION_ARRAY[2]
- CacheProtocol =
The protocol the cache object has to conform to. This is a minimal subset of the ActiveSupport::Cache::Store protocol.
Protocol do # Clear the entire cache. def clear( = nil) end # Returns true if the cache contains an entry for the given key. def exist?(name, = nil) end # Fetches data from the cache, using the given key. If there is data in the # cache with the given key, then that data is returned. Otherwise, nil is # returned. def read(name, = nil) end # Writes the value to the cache, with the key. def write(name, value, = nil) end # Iterate over all cache entries and yield to their names. def each_name(&block) end # Return another cache instance that was correctly configured. def prototype dup end end
Class Attribute Summary collapse
-
.wrapped ⇒ Object
Returns the value of attribute wrapped.
Attributes included from Configure
Class Method Summary collapse
-
.cache_clear ⇒ Object
Clear all memoization caches at once.
Methods included from Configure
Class Attribute Details
.wrapped ⇒ Object
Returns the value of attribute wrapped.
7 8 9 |
# File 'lib/mize.rb', line 7 def wrapped @wrapped end |
Class Method Details
.cache_clear ⇒ Object
Clear all memoization caches at once.
5 6 7 |
# File 'lib/mize/global_clear.rb', line 5 def cache_clear each_cache(&:clear) end |