Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

applies patch in http://rails.lighthouseapp.com/projects/8994/tickets…

  • Loading branch information...
commit acf520457462d3987adbf540625c59e355e4d974 1 parent 408d5fd
@fxn fxn authored
View
6 activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
@@ -44,6 +44,12 @@ def uncached
@query_cache_enabled = old
end
+ # Clears the query cache.
+ #
+ # One reason you may wish to call this method explicitly is between queries
+ # that ask the database to randomize results. Otherwise the cache would see
+ # the same SQL query and repeatedly return the same result each time, silently
+ # undermining the randomness you were expecting.
def clear_query_cache
@query_cache.clear if @query_cache
end
Please sign in to comment.
Something went wrong with that request. Please try again.