Class: Moneta::WeakCreate
- Includes:
- CreateSupport
- Defined in:
- lib/moneta/weak.rb
Overview
Note:
The create method will not be thread or multi-process safe (this is meant by weak)
Adds weak create support to the underlying store
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(adapter, options = {}) ⇒ WeakCreate
constructor
A new instance of WeakCreate.
Methods included from CreateSupport
Methods inherited from Proxy
#clear, #close, #create, #delete, #features, #increment, #key?, #load, #store
Methods included from Defaults
#[], #[]=, #close, #create, #decrement, #features, #fetch, included, #increment, #key?, #supports?
Methods included from OptionSupport
#expires, #prefix, #raw, #with
Constructor Details
#initialize(adapter, options = {}) ⇒ WeakCreate
Returns a new instance of WeakCreate.
11 12 13 14 |
# File 'lib/moneta/weak.rb', line 11 def initialize(adapter, = {}) raise 'Store already supports feature :create' if adapter.supports?(:create) super end |