Module: Lore::Cache::Cacheable

Included in:
Model, Table_Accessor
Defined in:
lib/lore/cache/cacheable.rb

Constant Summary collapse

@@cache_impl =
false

Instance Method Summary collapse

Instance Method Details

#create_entity_cache(query_string, result) ⇒ Object



26
27
28
# File 'lib/lore/cache/cacheable.rb', line 26

def create_entity_cache(query_string, result) 
  @@cache_impl.create(self, query_string, result) if @@cache_impl
end

#entity_cacheObject



14
15
16
# File 'lib/lore/cache/cacheable.rb', line 14

def entity_cache
  @@cache_impl 
end

#flush_entity_cacheObject



22
23
24
# File 'lib/lore/cache/cacheable.rb', line 22

def flush_entity_cache
  @@cache_impl.flush(self) if @@cache_impl
end

#read_entity_cache(query_string) ⇒ Object



30
31
32
# File 'lib/lore/cache/cacheable.rb', line 30

def read_entity_cache(query_string)
  @@cache_impl.read(self, query_string) if @@cache_impl
end

#use_entity_cache(entity_cache_class) ⇒ Object



18
19
20
# File 'lib/lore/cache/cacheable.rb', line 18

def use_entity_cache(entity_cache_class)
  @@cache_impl = entity_cache_class 
end