public
Description: A Rails plugin that lets you embed actions in your views (with caching and response_to support)
Homepage: http://github.com/sd/embedded-actions/wikis/home
Clone URL: git://github.com/sd/embedded-actions.git
 r67@chuao:  sd | 2007-10-23 19:21:26 -0400
 added short doc about caching


git-svn-id: 
https://dev.notso.net/svn/rails/plugins/embedded_actions/trunk@129 
71bf3dff-0d17-0410-8985-d5c41cf5d41c
sd (author)
Tue Oct 23 16:22:01 -0700 2007
commit  86d8a93c9e57fbae3674fc256617f592e501c74f
tree    7653a758702d07b1738e68ac9d6208de314bdd53
parent  6b2494809ddaf6a68c46dcc367fa3e47e9eeee9b
0
...
21
22
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
25
26
...
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
0
@@ -21,6 +21,22 @@ for different parameters) just like page caching, but at the level of html
0
 fragments. So your dynamic pages can still be rendered dynamically, but some of
0
 the embedded actions can be cached (and expired) independently.
0
 
0
+Just declare an action as 'cacheable' in a way similar to page caching,
0
+by invoking "caches_embedded" with the name of the action to cache.
0
+
0
+class TestController < ApplicationController
0
+ caches_embedded :user_list
0
+
0
+ def user_list
0
+ ...
0
+ end
0
+end
0
+
0
+Cached fragments can be invalidated with calls to expires_embedded, but you must
0
+remember to use the same set of parameters used to embed the cached action in
0
+the first place.
0
+
0
+
0
 -------------------------------------------------------------------------------
0
 Copyright (c) 2007 Sebastian Delmont <sd@notso.net>
0
 Copyright (c) 2007 StreetEasy / NMD Interactive <http://www.streeteasy.com/>

Comments

    No one has commented yet.