Module: Lore::Cache::Cache_Helpers
- Included in:
- Mmap_Entity_Cache
- Defined in:
- lib/lore/cache/abstract_entity_cache.rb
Instance Method Summary collapse
- #create_store(storefile_name) ⇒ Object
- #index_for(query) ⇒ Object
- #storefile_of(model_name, query) ⇒ Object
Instance Method Details
#create_store(storefile_name) ⇒ Object
75 76 77 78 |
# File 'lib/lore/cache/abstract_entity_cache.rb', line 75 def create_store(storefile_name) store = PStore.new(storefile_name) unless storefile_name.nil? return store end |
#index_for(query) ⇒ Object
67 68 69 |
# File 'lib/lore/cache/abstract_entity_cache.rb', line 67 def index_for(query) Digest::MD5.hexdigest(query) end |
#storefile_of(model_name, query) ⇒ Object
71 72 73 |
# File 'lib/lore/cache/abstract_entity_cache.rb', line 71 def storefile_of(model_name, query) '/tmp/lore_cache__' << model_name + '_' << Digest::MD5.hexdigest(query) end |