about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-30 15:57:56 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-30 15:57:56 +0100
commita21bcac9e156d8c40fe7c15c62ac71a901091cc5 (patch)
treeb02405fbe4fc288bfc74525c1eddcef1a86d9444 /app/controllers/application_controller.rb
parent356d3874ebd79573a8da58e2ac76eaa4612cec16 (diff)
Further abstract caching for includes
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 2 insertions, 0 deletions
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))