Skip to content

Instantly share code, notes, and snippets.

@stim371
Created September 6, 2011 00:04
Show Gist options
  • Save stim371/1196214 to your computer and use it in GitHub Desktop.
Save stim371/1196214 to your computer and use it in GitHub Desktop.
How to clear the query cache in Rails. toss this right before a db call to make sure you're pulling off the db and not the cache. i use this during development, but it should probably be used sparingly in production.
Model.connection.clear_query_cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment