Files

Class Index [+]

Quicksearch

UbiquoDesign::CacheManagers::RubyHash

Cache Manager implementation using a simple ruby hash Useful as a lightweight manager, it’s used in manager tests

Protected Class Methods

base() click to toggle source

Returns or initializes the hash that serves as store

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/cache_managers/ruby_hash.rb, line 33
33:         def base
34:           @base ||= {}
35:         end
delete(content_id) click to toggle source

removes the widget content from the store

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/cache_managers/ruby_hash.rb, line 28
28:         def delete content_id
29:           base.delete(content_id)
30:         end
multi_retrieve(content_ids) click to toggle source

retrieves the widgets content by an array of content_ids

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/cache_managers/ruby_hash.rb, line 17
17:         def multi_retrieve content_ids
18:           base.slice(*content_ids)
19:         end
retrieve(content_id) click to toggle source

retrieves the widget content identified by content_id

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/cache_managers/ruby_hash.rb, line 12
12:         def retrieve content_id
13:           base[content_id]
14:         end
store(content_id, contents, expiration_time = nil) click to toggle source

Stores a widget content indexing by a content_id expiration_time is not currently supported

    # File vendor/plugins/ubiquo_design/lib/ubiquo_design/cache_managers/ruby_hash.rb, line 23
23:         def store content_id, contents, expiration_time = nil
24:           base.merge!(content_id => contents)
25:         end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.