Class: Cassette::Cache::NullStore

Inherits:
Object
  • Object
show all
Defined in:
lib/cassette/cache/null_store.rb

Overview

You cache nothing, null store

This is a fallback class when Rails or ActiveSupport cache cannot be loaded

Instance Method Summary collapse

Instance Method Details

#clearObject



10
11
# File 'lib/cassette/cache/null_store.rb', line 10

def clear
end

#delete_matched(_key) ⇒ Object



17
18
19
# File 'lib/cassette/cache/null_store.rb', line 17

def delete_matched(_key)
  true
end

#fetch(_key, _options = {}, &block) ⇒ Object



29
30
31
# File 'lib/cassette/cache/null_store.rb', line 29

def fetch(_key, _options = {}, &block)
  block.call
end

#increment(_key, _by = 1, _options = {}) ⇒ Object



25
26
27
# File 'lib/cassette/cache/null_store.rb', line 25

def increment(_key, _by = 1, _options = {})
  0
end

#read(_key, _options = {}) ⇒ Object



13
14
15
# File 'lib/cassette/cache/null_store.rb', line 13

def read(_key, _options = {})
  nil
end

#write(_key, _value, _options = {}) ⇒ Object



21
22
23
# File 'lib/cassette/cache/null_store.rb', line 21

def write(_key, _value, _options = {})
  true
end