Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
Instance Attribute Summary
#memcache_query_cache_options
Instance Method Summary
collapse
Instance Method Details
#execute_with_clean_query_cache(*args) ⇒ Object
93
94
95
96
97
98
99
100
101
|
# File 'lib/query_memcached.rb', line 93
def execute_with_clean_query_cache(*args)
return execute_without_clean_query_cache(*args) unless self.memcache_query_cache_options && query_cache_enabled
sql = args[0].strip
if sql =~ /^(INSERT|UPDATE|ALTER|DROP|DELETE)/i
table_name = ActiveRecord::Base.(sql).first
ActiveRecord::Base.increase_version!(table_name)
end
execute_without_clean_query_cache(*args)
end
|