class CrawlStation::CacheAdapters::MemoryAdapter

Public Class Methods

new() click to toggle source
# File lib/crawl_station/cache_adapters/memory_adapter.rb, line 4
def initialize
  @cache = {}
  @cache.extend(MonitorMixin)
  ['[]=', '[]', 'include?'].each do |method_name|
    define_singleton_method method_name do |*args|
      @cache.synchronize do
        @cache.send(method_name, *args)
      end
    end
  end
end