The newest Ruby-GetText-1.10.0 support Action/Fragment caching.
class ArticlesController < ApplicationController
caches_action :show # Action cache
:
def show
:
:
end
def create
@article = Article.new(params[:article])
if @article.save
expire_fragment(:action => "list") # Clear Flagment cache
expire_action(:action => "show") # Clear Action cache.
:
:
end
end
# app/views/articles/list.rhtml
<h1>Listing articles</h1>
<% cache do %> #Flagment cache.
Fragment cache
<% end %>
HTH,
--
.:% Masao Mutoh<mu...@highway.ne.jp>