Class: CrawlStation::CacheAdapters::DbAdapter

Inherits:
AbstractAdapter show all
Defined in:
lib/crawl_station/cache_adapters/db_adapter.rb

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#[]=

Instance Method Details

#[](key) ⇒ Object



4
5
6
# File 'lib/crawl_station/cache_adapters/db_adapter.rb', line 4

def [](key)
  recent_schedule.where(link: key).first
end

#include?(key) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/crawl_station/cache_adapters/db_adapter.rb', line 8

def include?(key)
  recent_schedule.exists?(link: key)
end