Module: Lore::Cache

Defined in:
lib/lore/cache/bits.rb,
lib/lore/cache/cacheable.rb,
lib/lore/cache/file_index.rb,
lib/lore/cache/cached_entities.rb,
lib/lore/cache/mmap_entity_cache.rb,
lib/lore/cache/memory_entity_cache.rb,
lib/lore/cache/abstract_entity_cache.rb,
lib/lore/cache/memcache_entity_cache.rb,
lib/lore/cache/mmap_entity_cache_bork.rb

Defined Under Namespace

Modules: Cache_Helpers, Cacheable Classes: Abstract_Entity_Cache, Cached_Entities, File_Index, Memcache_Entity_Cache, Memory_Entity_Cache, Mmap_Entity_Cache

Constant Summary collapse

@@ignore_params =
[ 'cb__model', 'cb__controller', 'cb__mode' ]

Class Method Summary collapse

Class Method Details

.store_name(klass_name, controller, mode, keys) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/lore/cache/bits.rb', line 7

def self.store_name(klass_name, controller, mode, keys)
  key_string = ''
  keys.each_pair { |name, value|
    key_string += '@@@'+name+'==' << value.to_s unless @@ignore_params.include? name
  }
  controller = '*' if controller == :all
  mode = '*'       if mode == :all
  
  store_name  = '/tmp/cb__cache__' << klass_name.to_s << '@@@' << controller.to_s << '@@@' << mode.to_s
  store_name += key_string unless key_string == ''

  return store_name
end