Class: ActiveSupport::Cache::BlackholeStore

Inherits:
Store
  • Object
show all
Defined in:
lib/active_support/cache/blackhole_store.rb

Instance Method Summary collapse

Constructor Details

#initializeBlackholeStore

Returns a new instance of BlackholeStore.



5
6
7
8
9
# File 'lib/active_support/cache/blackhole_store.rb', line 5

def initialize
  super

  @data = {}
end

Instance Method Details

#clearObject



33
34
# File 'lib/active_support/cache/blackhole_store.rb', line 33

def clear
end

#delete(key, options = nil) ⇒ Object



21
22
23
24
# File 'lib/active_support/cache/blackhole_store.rb', line 21

def delete(key, options = nil)
  log("Delete", key, options)
  false
end

#delete_matched(matcher, options = nil) ⇒ Object



26
27
# File 'lib/active_support/cache/blackhole_store.rb', line 26

def delete_matched(matcher, options = nil)
end

#exist?(key, options = nil) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/active_support/cache/blackhole_store.rb', line 29

def exist?(key, options = nil)    
   false
end

#keysObject



36
37
38
# File 'lib/active_support/cache/blackhole_store.rb', line 36

def keys
  @data.keys
end

#read(key, options = nil) ⇒ Object



11
12
13
14
# File 'lib/active_support/cache/blackhole_store.rb', line 11

def read(key, options = nil)
  log("Read", key, options)
  nil
end

#write(key, value, options = nil) ⇒ Object



16
17
18
19
# File 'lib/active_support/cache/blackhole_store.rb', line 16

def write(key, value, options = nil)
  log("Write", key, options)
  value
end