Excellent. Just what I was looking for.<br><br>Steve<br><br><div><span class="gmail_quote">On 2/1/06, <b class="gmail_sendername">Alain Ravet</b> <<a href="mailto:arav2132@biz.tiscali.be">arav2132@biz.tiscali.be</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Steve<br> >.. how is pagination and query strings handled with fragment<br>caching?
<br> > Does each page get its own fragment and query string identifier?<br><br>Yes. Each page related fragment is cached separately.<br><br>Here is what works for me:<br><br><br>In the view: (event/list.rhtml, a paginated view, with an optional
<br>'year' filter. )<br><br> line 1: <% cache(:controller => 'event', :action => 'list', :group<br>=> visitor.group, :page => params[:page], :year => params[:year]) do%><br> ...<br><br>
In the Controller:<br> class EventController < ApplicationController<br> cache_sweeper :event_sweeper, :only => [:edit, :update, :new,<br>:create, :destroy]<br> ...<br><br>In the sweeper:<br> class EventSweeper < ActionController::Caching::BaseSweeper
<br> observe Event<br><br> def after_save(record)<br> expire_fragment %r{event/list.*}<br> expire_home_page<br> end<br> def after_destroy(record)<br> expire_fragment %r{event/list.*}
<br> expire_home_page<br> end<br><br>end<br><br><br>_______________________________________________<br>Rails mailing list<br><a href="mailto:Rails@lists.rubyonrails.org">Rails@lists.rubyonrails.org</a><br>
<a href="http://lists.rubyonrails.org/mailman/listinfo/rails">http://lists.rubyonrails.org/mailman/listinfo/rails</a><br></blockquote></div><br>