Inconsistent behavior of caches_page method

ruby version : 1.8.6 rails version : 2.0.2 os : ubuntu 7.10

class StoreController < ApplicationController

caches_page :index

def index

    do something


def expire

    expire_page  :controller=>'store', :action=>'index'



when i visit: http://localhost:3000/store, a “RAILS_ROOT/public/
store.html” will appear

as i visit: http://localhost:3000/store/index, a “RAILS_ROOT/public/
store/index.html” will appear

the expire method in my class will delete the file “RAILS_ROOT/public/

the problem is: {:controller=>‘store’,:action=>‘index’ }—>url_for
method----->’/store’ ,so expire_page will delete the file

if i don’t use index action, it will not be a problem, but, anyone
have better idea? thanks for the reply.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs