Class: Delorean::Cache::Adapters::NoCache

Inherits:
Base
  • Object
show all
Defined in:
lib/delorean/cache/adapters/no_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(size_per_class: 1000) ⇒ NoCache

Returns a new instance of NoCache.



11
# File 'lib/delorean/cache/adapters/no_cache.rb', line 11

def initialize(size_per_class: 1000); end

Instance Attribute Details

#lookup_cacheObject (readonly)

Returns the value of attribute lookup_cache.



9
10
11
# File 'lib/delorean/cache/adapters/no_cache.rb', line 9

def lookup_cache
  @lookup_cache
end

#size_per_classObject (readonly)

Returns the value of attribute size_per_class.



9
10
11
# File 'lib/delorean/cache/adapters/no_cache.rb', line 9

def size_per_class
  @size_per_class
end

Instance Method Details

#cache_item(klass:, cache_key:, item:) ⇒ Object



17
# File 'lib/delorean/cache/adapters/no_cache.rb', line 17

def cache_item(klass:, cache_key:, item:); end

#cache_item?(klass:, method_name:, args:) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/delorean/cache/adapters/no_cache.rb', line 13

def cache_item?(klass:, method_name:, args:)
  false
end

#cache_key(klass:, method_name:, args:) ⇒ Object



23
24
25
# File 'lib/delorean/cache/adapters/no_cache.rb', line 23

def cache_key(klass:, method_name:, args:)
  :no_cache_key
end

#clear!(klass:) ⇒ Object



27
# File 'lib/delorean/cache/adapters/no_cache.rb', line 27

def clear!(klass:); end

#clear_all!Object



29
# File 'lib/delorean/cache/adapters/no_cache.rb', line 29

def clear_all!; end

#fetch_item(klass:, cache_key:, default: nil) ⇒ Object



19
20
21
# File 'lib/delorean/cache/adapters/no_cache.rb', line 19

def fetch_item(klass:, cache_key:, default: nil)
  default
end