Module: Cacheble
- Defined in:
- lib/a-commons.rb
Class Method Summary collapse
- .clear_cache ⇒ Object
- .extended(_obj) ⇒ Object
- .get_cache(_key, _value) ⇒ Object
- .included(_obj) ⇒ Object
- .set_cache(_key, _value) ⇒ Object
Instance Method Summary collapse
Class Method Details
.clear_cache ⇒ Object
798 799 800 |
# File 'lib/a-commons.rb', line 798 def self.clear_cache @@cache.clear end |
.extended(_obj) ⇒ Object
786 787 788 |
# File 'lib/a-commons.rb', line 786 def self.extended(_obj) _obj.__initialize_cache(_obj) end |
.get_cache(_key, _value) ⇒ Object
806 807 808 |
# File 'lib/a-commons.rb', line 806 def self.get_cache(_key, _value) @@cache[_key] end |
.included(_obj) ⇒ Object
790 791 792 |
# File 'lib/a-commons.rb', line 790 def self.included(_obj) _obj.__initialize_cache(_obj) end |
.set_cache(_key, _value) ⇒ Object
802 803 804 |
# File 'lib/a-commons.rb', line 802 def self.set_cache(_key, _value) @@cache[_key]=_value end |
Instance Method Details
#__initialize_cache(_obj) ⇒ Object
794 795 796 |
# File 'lib/a-commons.rb', line 794 def __initialize_cache(_obj) @@cache = Hash.new end |