From a21bcac9e156d8c40fe7c15c62ac71a901091cc5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 30 Nov 2016 15:57:56 +0100 Subject: Further abstract caching for includes --- app/controllers/application_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 5243bc446..9722f86b5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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)) -- cgit