class Apollo::Cache::NullCache
Public Instance Methods
get(key)
click to toggle source
# File lib/apollo_crawler/cache/null_cache.rb, line 30 def get(key) nil end
initilize(options = {})
click to toggle source
Calls superclass method
# File lib/apollo_crawler/cache/null_cache.rb, line 26 def initilize(options = {}) super(options) end
set(key, value)
click to toggle source
Set value associated with key Return cached value
# File lib/apollo_crawler/cache/null_cache.rb, line 48 def set(key, value) return value end
try_get(key, *args) { |args| ... }
click to toggle source
Get value associated with key from cache
# File lib/apollo_crawler/cache/null_cache.rb, line 35 def try_get(key, *args) res = get(key) # Not found, Create, cache and return if res.nil? && block_given? res = yield args end return res end