Further abstract caching for includes
This commit is contained in:
parent
356d3874eb
commit
a21bcac9e1
4 changed files with 22 additions and 2 deletions
|
@ -59,6 +59,8 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def cache_collection(raw, klass)
|
||||
return raw unless klass.respond_to?(:with_includes)
|
||||
|
||||
uncached_ids = []
|
||||
cached_keys_with_value = Rails.cache.read_multi(*raw.map(&:cache_key))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue