Module: CachedCounts::ActiveRecordRelationMethods
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/cached_counts/active_record_relation_methods.rb
Instance Method Summary collapse
- #clear_count_cache ⇒ Object
- #count_with_caching(*args) ⇒ Object
- #length_with_caching(*args) ⇒ Object
- #size_with_caching(*args) ⇒ Object
Instance Method Details
#clear_count_cache ⇒ Object
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 |