Object
Proxy base class @api public
@param [Moneta store] adapter underlying adapter @param [Hash] options
# File lib/moneta/proxy.rb, line 11 def initialize(adapter, options = {}) @adapter = adapter end
Clear all keys in this store
@param [Hash] options @return [void] @api public
# File lib/moneta/proxy.rb, line 82 def clear(options = {}) adapter.clear(options) self end
(see Defaults#close)
# File lib/moneta/proxy.rb, line 31 def close adapter.close end
(see Defaults#create)
# File lib/moneta/proxy.rb, line 26 def create(key, value, options = {}) adapter.create(key, value, options) end
Delete the key from the store and return the current value
@param [Object] key @return [Object] current value @param [Hash] options @option options [Boolean] :raw Raw access without value transformation (See {Transformer}) @option options [String] :prefix Prefix key (See {Transformer}) @option options Other options as defined by the adapters or middleware @api public
# File lib/moneta/proxy.rb, line 73 def delete(key, options = {}) adapter.delete(key, options) end
(see Default#features)
# File lib/moneta/proxy.rb, line 88 def features @features ||= (self.class.features + adapter.features).uniq.freeze end
(see Defaults#increment)
# File lib/moneta/proxy.rb, line 21 def increment(key, amount = 1, options = {}) adapter.increment(key, amount, options) end
(see Defaults#key?)
# File lib/moneta/proxy.rb, line 16 def key?(key, options = {}) adapter.key?(key, options) end
Fetch value with key. Return nil if the key doesn't exist
@param [Object] key @param [Hash] options @option options [Integer] :expires Update expiration time (See {Expires}) @option options [Boolean] :raw Raw access without value transformation (See {Transformer}) @option options [String] :prefix Prefix key (See {Transformer}) @option options Other options as defined by the adapters or middleware @return [Object] value @api public
# File lib/moneta/proxy.rb, line 45 def load(key, options = {}) adapter.load(key, options) end
Store value with key
@param [Object] key @param [Object] value @param [Hash] options @option options [Integer] :expires Set expiration time (See {Expires}) @option options [Boolean] :raw Raw access without value transformation (See {Transformer}) @option options [String] :prefix Prefix key (See {Transformer}) @option options Other options as defined by the adapters or middleware @return value @api public
# File lib/moneta/proxy.rb, line 60 def store(key, value, options = {}) adapter.store(key, value, options) end
Generated with the Darkfish Rdoc Generator 2.