<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>dirties_query_cache (ActiveRecord::ConnectionAdapters::QueryCache)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/active_record/connection_adapters/abstract/query_cache.rb, line 14</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirties_query_cache</span>(<span class="ruby-identifier">base</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">method_names</span>) <span class="ruby-identifier">method_names</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">method_name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-value str">"def \#{method_name}_with_query_dirty(*args) # def update_with_query_dirty(*args)\nclear_query_cache if @query_cache_enabled # clear_query_cache if @query_cache_enabled\n\#{method_name}_without_query_dirty(*args) # update_without_query_dirty(*args)\nend # end\n#\nalias_method_chain :\#{method_name}, :query_dirty # alias_method_chain :update, :query_dirty\n"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span> <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>