Parent

Merb::Cache::AbstractStore

Public Class Methods

new(config = {}) click to toggle source
   # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 3
3:   def initialize(config = {}); end

Public Instance Methods

delete(key, parameters = {}) click to toggle source

deletes the entry for the key & parameter from the store.

@param [#] key the key used to identify an entry @param [Hash] parameters optional parameters used to identify an entry @raise [TrueClass] true if the an entry matching the key and parameters is successfully deleted, false otherwise @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 81
81:   def delete(key, parameters = {})
82:     raise NotImplementedError
83:   end
delete_all() click to toggle source

deletes all entries for the key & parameters for the store.

@return [TrueClass] true if all entries in the store are erased, false otherwise @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 89
89:   def delete_all
90:     raise NotImplementedError
91:   end
delete_all!() click to toggle source

dangerous version of delete_all. Used by strategy stores, which may delete entries not associated with the strategy store making the call.

@return [TrueClass] true if all entries in the store are erased, false otherwise @raise [NotImplementedError] API method has not been implemented

     # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 98
 98:   def delete_all!
 99:     delete_all
100:   end
exists?(key, parameters = {}) click to toggle source

returns true/false/nil based on if data identified by the key & parameters is persisted in the store.

@param [#] key the key used to identify an entry @param [Hash] parameters optional parameters used to identify an entry @return [TrueClass] true if the key and parameters match an entry in the store, false otherwise @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 71
71:   def exists?(key, parameters = {})
72:     raise NotImplementedError
73:   end
fetch(key, parameters = {}, conditions = {}, &blk) click to toggle source

tries to read the data from the store. If that fails, it calls the block parameter and persists the result.

@param [#] key the key used to identify an entry @param [Hash] parameters optional parameters used to identify an entry @param [Hash] conditions optional conditions that place constraints or detail instructions for storing an entry @return [Object, NilClass] the match entry or the result of the block call, or nil if the entry is not successfully written @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 60
60:   def fetch(key, parameters = {}, conditions = {}, &blk)
61:     raise NotImplementedError
62:   end
read(key, parameters = {}) click to toggle source

gets the data from the store identified by the key & parameters. return nil if the entry does not exist.

@param [#] key the key used to identify an entry @param [Hash] parameters optional parameters used to identify an entry @return [Object, NilClass] the match entry, or nil if no entry exists matching the key and parameters @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 24
24:   def read(key, parameters = {})
25:     raise NotImplementedError
26:   end
writable?(key, parameters = {}, conditions = {}) click to toggle source

determines if the store is able to persist data identified by the key & parameters with the given conditions.

@param [#] key the key used to identify an entry @param [Hash] parameters optional parameters used to identify an entry @param [Hash] conditions optional conditions that place constraints or detail instructions for storing an entry @return [TrueClass] the ability of the store to write an entry based on the key, parameters, and conditions @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 13
13:   def writable?(key, parameters = {}, conditions = {})
14:     raise NotImplementedError
15:   end
write(key, data = nil, parameters = {}, conditions = {}) click to toggle source

persists the data so that it can be retrieved by the key & parameters. returns nil if it is unable to persist the data. returns true if successful.

@param [#] key the key used to identify an entry @param data the object to persist as an entry @param [Hash] parameters optional parameters used to identify an entry @param [Hash] conditions optional conditions that place constraints or detail instructions for storing an entry @return [TrueClass, NilClass] true if the entry was successfully written, otherwise nil @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 38
38:   def write(key, data = nil, parameters = {}, conditions = {})
39:     raise NotImplementedError
40:   end
write_all(key, data = nil, parameters = {}, conditions = {}) click to toggle source

@param [#] key the key used to identify an entry @param data the object to persist as an entry @param [Hash] parameters optional parameters used to identify an entry @param [Hash] conditions optional conditions that place constraints or detail instructions for storing an entry @return [TrueClass, NilClass] true if the entry was successfully written, otherwise nil @raise [NotImplementedError] API method has not been implemented

    # File lib/merb-cache/stores/fundamental/abstract_store.rb, line 48
48:   def write_all(key, data = nil, parameters = {}, conditions = {})
49:     write(key, data, parameters, conditions)
50:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.