Module: Eac::SimpleCache

Defined in:
lib/eac/simple_cache.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/eac/simple_cache.rb', line 3

def method_missing(method, *args, &block)
  uncached_method = "#{method}_uncached"
  if respond_to?(uncached_method, true)
    call_method_with_cache(uncached_method, args, &block)
  else
    super
  end
end

Instance Method Details

#reset_cacheObject



12
13
14
# File 'lib/eac/simple_cache.rb', line 12

def reset_cache
  @cache_keys = nil
end