Module: CacheMethod::InstanceMethods

Defined in:
lib/cache_method.rb

Overview

All Objects, including instances and Classes, get the #clear_method_cache method.

Instance Method Summary collapse

Instance Method Details

#clear_method_cache(method_id) ⇒ Object

Clear the cache for a particular method.

Note: Remember to define #hash on any object whose instance methods might get cached.

Example:

my_blog.clear_method_cache :get_latest_entries


32
33
34
# File 'lib/cache_method.rb', line 32

def clear_method_cache(method_id)
  ::CacheMethod::Epoch.mark_passing :obj => self, :method_id => method_id
end