ruby on rails - RoR fragement caching based on id -


is there way cache fragment based on id , part?

for example, <% cache(:id => session[:user], :part => 'test') %>

the code doesn't seem work though. still caches based on action called it.

edit:

the problem having cannot expire fragment in ajax request(i refreshing page page.reload). think problem action i'm trying expire member of resource.

here's routes code:

map.resources :profiles, :as => 'profile', :only => [:show, :edit, :update], :member => {   :home => :get   } |profile| 

here's expire fragment:

expire_fragment(:controller => 'profiles', :action => 'home', :part => 'test') 

thanks


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -