]> git.openstreetmap.org Git - rails.git/blobdiff - config/initializers/query_cache.rb
Merge branch 'master' into openstreetbugs2
[rails.git] / config / initializers / query_cache.rb
index 83d42feecc29b941e25c0a4f9f7d269a400a5623..61a618bca7d7b6656533b7a60700c3f4e9e1cec6 100644 (file)
@@ -1,10 +1,12 @@
-module ActiveRecord
-  module ConnectionAdapters
-    module QueryCache
-      private
-        def cache_sql(sql)
-         yield
-        end
+if defined?(ActiveRecord::ConnectionAdaptors::QueryCache)
+  module ActiveRecord
+    module ConnectionAdapters
+      module QueryCache
+        private
+          def cache_sql(sql)
+         yield
+          end
+      end
     end
   end
 end
     end
   end
 end