aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/guides/source/caching_with_rails.textile17
1 files changed, 7 insertions, 10 deletions
diff --git a/railties/guides/source/caching_with_rails.textile b/railties/guides/source/caching_with_rails.textile
index f4fb8ec348..d77f48929d 100644
--- a/railties/guides/source/caching_with_rails.textile
+++ b/railties/guides/source/caching_with_rails.textile
@@ -80,8 +80,6 @@ end
If you want a more complicated expiration scheme, you can use cache sweepers
to expire cached objects when things change. This is covered in the section on Sweepers.
-[More: caching paginated results? more examples? Walk-through of page caching?]
-
h4. Action Caching
One of the issues with Page Caching is that you cannot use it for pages that
@@ -122,11 +120,14 @@ layout so that dynamic information in the layout such as logged in user info
or the number of items in the cart can be left uncached. This feature is
available as of Rails 2.2.
+You can modify the default action cache path by passing a +:cache_path+ option.
+This will be passed directly to ActionCachePath.path_for. This is handy for
+actions with multiple possible routes that should be cached differently. If
+a block is given, it is called with the current controller instance.
-[More: more examples? Walk-through of Action Caching from request to response?
- Description of Rake tasks to clear cached files? Show example of
- subdomain caching? Talk about :cache_path, :if and assing blocks/Procs
- to expire_action?]
+Finally, if you are using memcached, you can also pass +:expires_in+. In fact,
+all parameters not used by caches_action are sent to the underlying cache
+store.
h4. Fragment Caching
@@ -190,8 +191,6 @@ the key and can be expired the same way:
expire_fragment(:key => ['all_available_products', @latest_product.created_at].join(':'))
</ruby>
-[More: more examples? description of fragment keys and expiration, etc? pagination?]
-
h4. Sweepers
Cache sweeping is a mechanism which allows you to get around having a ton of
@@ -259,8 +258,6 @@ class ProductsController < ActionController
end
</ruby>
-[More: more examples? better sweepers?]
-
h4. SQL Caching
Query caching is a Rails feature that caches the result set returned by each