Class: SimpleCrowd::Cache::NullStore
- Inherits:
-
Object
- Object
- SimpleCrowd::Cache::NullStore
- Defined in:
- lib/simple_crowd/cache/null_store.rb
Overview
A cache store implementation which doesn’t actually store anything.
Implements ActiveSupport::Cache::Store interface without depending on the active_support gem.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#silence ⇒ Object
(also: #silence?)
readonly
Returns the value of attribute silence.
Class Method Summary collapse
Instance Method Summary collapse
- #cleanup(options = nil) ⇒ Object
- #clear(options = nil) ⇒ Object
- #decrement(name, amount = 1, options = nil) ⇒ Object
- #delete(name, options = nil) ⇒ Object
- #delete_matched(matcher, options = nil) ⇒ Object
- #exist?(name, options = nil) ⇒ Boolean
- #fetch(name, options = nil) ⇒ Object
- #increment(name, amount = 1, options = nil) ⇒ Object
-
#initialize(options = nil) ⇒ NullStore
constructor
A new instance of NullStore.
- #mute ⇒ Object
- #read(name, options = nil) ⇒ Object
- #silence! ⇒ Object
- #synchronize ⇒ Object
- #write(name, vaue, options = nil) ⇒ Object
Constructor Details
#initialize(options = nil) ⇒ NullStore
Returns a new instance of NullStore.
12 13 |
# File 'lib/simple_crowd/cache/null_store.rb', line 12 def initialize( = nil) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/simple_crowd/cache/null_store.rb', line 9 def @options end |
#silence ⇒ Object (readonly) Also known as: silence?
Returns the value of attribute silence.
9 10 11 |
# File 'lib/simple_crowd/cache/null_store.rb', line 9 def silence @silence end |
Class Method Details
.logger ⇒ Object
65 66 67 |
# File 'lib/simple_crowd/cache/null_store.rb', line 65 def self.logger nil end |
.logger=(logger) ⇒ Object
69 70 |
# File 'lib/simple_crowd/cache/null_store.rb', line 69 def self.logger=(logger) end |
Instance Method Details
#cleanup(options = nil) ⇒ Object
53 54 |
# File 'lib/simple_crowd/cache/null_store.rb', line 53 def cleanup( = nil) end |
#clear(options = nil) ⇒ Object
50 51 |
# File 'lib/simple_crowd/cache/null_store.rb', line 50 def clear( = nil) end |
#decrement(name, amount = 1, options = nil) ⇒ Object
59 60 |
# File 'lib/simple_crowd/cache/null_store.rb', line 59 def decrement(name, amount = 1, = nil) end |
#delete(name, options = nil) ⇒ Object
42 43 44 |
# File 'lib/simple_crowd/cache/null_store.rb', line 42 def delete(name, = nil) false end |
#delete_matched(matcher, options = nil) ⇒ Object
62 63 |
# File 'lib/simple_crowd/cache/null_store.rb', line 62 def delete_matched(matcher, = nil) end |
#exist?(name, options = nil) ⇒ Boolean
46 47 48 |
# File 'lib/simple_crowd/cache/null_store.rb', line 46 def exist?(name, = nil) false end |
#fetch(name, options = nil) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/simple_crowd/cache/null_store.rb', line 26 def fetch(name, = nil) if block_given? yield else read(name, ) end end |
#increment(name, amount = 1, options = nil) ⇒ Object
56 57 |
# File 'lib/simple_crowd/cache/null_store.rb', line 56 def increment(name, amount = 1, = nil) end |
#mute ⇒ Object
15 16 17 |
# File 'lib/simple_crowd/cache/null_store.rb', line 15 def mute yield end |
#read(name, options = nil) ⇒ Object
34 35 36 |
# File 'lib/simple_crowd/cache/null_store.rb', line 34 def read(name, = nil) nil end |
#silence! ⇒ Object
19 20 |
# File 'lib/simple_crowd/cache/null_store.rb', line 19 def silence! end |
#synchronize ⇒ Object
22 23 24 |
# File 'lib/simple_crowd/cache/null_store.rb', line 22 def synchronize yield end |
#write(name, vaue, options = nil) ⇒ Object
38 39 40 |
# File 'lib/simple_crowd/cache/null_store.rb', line 38 def write(name, vaue, = nil) true end |