Module: Moribus::AggregatedCacheBehavior::ClassMethods

Defined in:
lib/moribus/aggregated_cache_behavior.rb

Overview

Class methods for model that includes AggregatedCacheBehavior

Instance Method Summary collapse

Instance Method Details

#aggregated_caching_columnObject

Return the column (attribute). Its value is used as a key for caching records.



46
47
48
# File 'lib/moribus/aggregated_cache_behavior.rb', line 46

def aggregated_caching_column
  @aggregated_caching_column
end

#clear_cacheObject

Empty the cache of aggregated records.



40
41
42
# File 'lib/moribus/aggregated_cache_behavior.rb', line 40

def clear_cache
  self.aggregated_records_cache = {}
end