Discarding cached SQL query results in ActiveRecord

Posted . Visible to the public.

ActiveRecord caches results of SQL queries Show archive.org snapshot . If you want to discard the cached results for one model, you can call MyModel.connection.clear_query_cache Show archive.org snapshot .

Thomas Klemm
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Klemm to makandra dev (2014-05-26 12:41)