Module: CachedCounts::ActiveRecordRelationMethods

Extended by:
ActiveSupport::Concern
Defined in:
lib/cached_counts/active_record_relation_methods.rb

Instance Method Summary collapse

Instance Method Details

#clear_count_cacheObject



32
33
34
# File 'lib/cached_counts/active_record_relation_methods.rb', line 32

def clear_count_cache
  CachedCounts::Cache.new(self).clear
end

#count_with_caching(*args) ⇒ Object



20
21
22
# File 'lib/cached_counts/active_record_relation_methods.rb', line 20

def count_with_caching(*args)
  CachedCounts::Cache.new(self).count
end

#length_with_caching(*args) ⇒ Object



24
25
26
# File 'lib/cached_counts/active_record_relation_methods.rb', line 24

def length_with_caching(*args)
  CachedCounts::Cache.new(self).count
end

#size_with_caching(*args) ⇒ Object



28
29
30
# File 'lib/cached_counts/active_record_relation_methods.rb', line 28

def size_with_caching(*args)
  CachedCounts::Cache.new(self).count
end