title: Action Cache for root URL not working
body: <p>Here's the setup.  I have web site which is essentially a simple CMS.  Here is the routes file:</p>
  
  <pre><code>map.connect ':url', :controller =&gt; :pages, :action =&gt; :show
  map.root :controller =&gt; :pages, :action =&gt; :show, :url =&gt; "/"
  </code></pre>
  
  <p>The page controller is thus:</p>
  
  <pre><code>class PagesController &lt; ApplicationController
    before_filter :verify_access, :except =&gt; [:show]
  
    # Cache show action if we are not logged in.
    caches_action :show, :layout =&gt; false, :unless =&gt; Proc.new { |controller| controller.logged_in? }
  
    def update
      @page = Page.find(params[:id])
  
      respond_to do |format|
        expire_action :action =&gt; :show, :url =&gt; @page.url
  </code></pre>
  
  <p>So when a visitor hits "/" it maps to :controller => "pages, :action => "show, :url => "/".  This generates a cached version on first try, then returns the appropriate result there after.  The log files show:</p>
  
  <pre><code>Processing PagesController#show (for 127.0.0.1 at 2009-08-02 14:15:01) [GET]
    Parameters: {"action"=&gt;"show", "url"=&gt;"/", "controller"=&gt;"pages"}
  Cached fragment hit: views/out.local// (0.1ms)
  Rendering template within layouts/application
  Filter chain halted as [#&lt;ActionController::Filters::AroundFilter:0x23eb03c @identifier=nil, @method=#&lt;Proc:0x01904858@/Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/caching/actions.rb:64&gt;, @kind=:filter, @options={:only=&gt;#&lt;Set: {"show"}&gt;, :if=&gt;nil, :unless=&gt;#&lt;Proc:0x025137ac@/Users/askegg/Sites/out/app/controllers/pages_controller.rb:6&gt;}&gt;] did_not_yield.
  Completed in 2ms (View: 1, DB: 0) | 200 OK [http://out.local/]
  </code></pre>
  
  <p>OK - all good so far.  When I update the page, it should expire the cache (see above).  The logs show:</p>
  
  <pre><code>  Page Load (0.2ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 3) 
    Page Load (0.1ms)   SELECT "pages".id FROM "pages" WHERE ("pages"."url" = '/' AND "pages".domain_id = 1 AND "pages".id &lt;&gt; 3) LIMIT 1
  Expired fragment: views/out.local/index (0.1ms)
  Redirected to http://out.local/pages/3
  Completed in 9ms (DB: 0) | 302 Found [http://out.local/pages/3]
  </code></pre>
  
  <p>See the problem?  Rails is clearing the cache named "index", but it sets it as "/".  Naturally this results in the cache NOT being cleared, so visitors are now seeing the old version.</p>