Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created December 21, 2008 20:15
Show Gist options
  • Save methodmissing/38756 to your computer and use it in GitHub Desktop.
Save methodmissing/38756 to your computer and use it in GitHub Desktop.
diff --git a/lib/query_memcached.rb b/lib/query_memcached.rb
index c911388..715c47d 100644
--- a/lib/query_memcached.rb
+++ b/lib/query_memcached.rb
@@ -88,6 +88,7 @@ module ActiveRecord
end
+if ActiveRecord::ConnectionAdapters.const_defined?( 'PostgreSQLAdapter' )
class PostgreSQLAdapter < AbstractAdapter
def execute_with_clean_query_cache(*args)
@@ -103,7 +104,8 @@ module ActiveRecord
alias_method_chain :execute, :clean_query_cache
end
-
+end
+
module QueryCache
# Enable the query cache within the block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment