class Drydock::ObjectCaches::NoCache
Public Instance Methods
clear()
click to toggle source
# File lib/drydock/object_caches/no_cache.rb, line 8 def clear true end
fetch(key, &blk)
click to toggle source
# File lib/drydock/object_caches/no_cache.rb, line 12 def fetch(key, &blk) blk.call end
get(key, &blk)
click to toggle source
# File lib/drydock/object_caches/no_cache.rb, line 16 def get(key, &blk) nil end
key?(key)
click to toggle source
# File lib/drydock/object_caches/no_cache.rb, line 20 def key?(key) false end
set(key, value = nil, &blk)
click to toggle source
# File lib/drydock/object_caches/no_cache.rb, line 24 def set(key, value = nil, &blk) if blk File.open('/dev/null', 'w') do |file| blk.call file end else # :noop: end nil end