aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@users.noreply.github.com>2015-01-11 17:17:21 -0200
committerJose Luis Duran <jlduran@users.noreply.github.com>2015-01-11 17:17:21 -0200
commit4d4f2df36e46558a913efb3a58a6e21fba21f937 (patch)
tree7b379521aa727e561aed514638c5f4c292ee9328 /guides/source
parent7b47f422cf367db4918be76c417d9db592a04adf (diff)
downloadrails-4d4f2df36e46558a913efb3a58a6e21fba21f937.tar.gz
rails-4d4f2df36e46558a913efb3a58a6e21fba21f937.tar.bz2
rails-4d4f2df36e46558a913efb3a58a6e21fba21f937.zip
Re-add section in SQL Caching
This section was accidentally removed in 4b5e424441149cf0f61a8182f4a92999577ce59a, and partially re-added in dc14b893e5904acb37ac327478f3880f33094b7a. [ci skip]
Diffstat (limited to 'guides/source')
-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
------------