Class: MyStuff::Cache::NullCache

Inherits:
Base
  • Object
show all
Defined in:
lib/my_stuff/cache/null_cache.rb

Overview

No-op implementation that implements the API, but does no caching.

Instance Attribute Summary

Attributes inherited from Base

#logger

Instance Method Summary collapse

Methods inherited from Base

#get_with_fallback, #get_with_multi_fallback, #initialize

Constructor Details

This class inherits a constructor from MyStuff::Cache::Base

Instance Method Details

#get(keys, options = {}) ⇒ Object



7
8
9
# File 'lib/my_stuff/cache/null_cache.rb', line 7

def get keys, options = {}
  [nil] * keys.size
end

#set(keys, options = {}) ⇒ Object



11
12
13
# File 'lib/my_stuff/cache/null_cache.rb', line 11

def set keys, options = {}
  # nop
end