aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-11 17:57:50 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-11 17:57:50 -0200
commit0e316ea2c4ceb1eac20a1f62b0e9db23fc6b41c8 (patch)
treea11627ddc3ec5a90d798c4ab8879a0e32d7907aa /guides
parent6c7af3a2641c0b281246334f56b3959396f1ae05 (diff)
parent4d4f2df36e46558a913efb3a58a6e21fba21f937 (diff)
downloadrails-0e316ea2c4ceb1eac20a1f62b0e9db23fc6b41c8.tar.gz
rails-0e316ea2c4ceb1eac20a1f62b0e9db23fc6b41c8.tar.bz2
rails-0e316ea2c4ceb1eac20a1f62b0e9db23fc6b41c8.zip
Merge pull request #18451 from jlduran/guides-sql-caching
Re-add section in SQL Caching [ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/caching_with_rails.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index 61b991df61..d5477eb72d 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -184,6 +184,10 @@ class ProductsController < ApplicationController
end
```
+The second time the same query is run against the database, it's not actually going to hit the database. The first time the result is returned from the query it is stored in the query cache (in memory) and the second time it's pulled from memory.
+
+However, it's important to note that query caches are created at the start of an action and destroyed at the end of that action and thus persist only for the duration of the action. If you'd like to store query results in a more persistent fashion, you can in Rails by using low level caching.
+
Cache Stores
------------