Clearing/expiring the 'index' action

Hi all,

I’m having problems trying to expire the ‘index’ action of a controller.

In short,
expire_action :action => ‘index’
doesn’t work, but
expire_fragment (url_for :action =>
‘index’).gsub(//index/,’’).split("://").last
works fine and deletes the cached page as expected.

I thought about this hack when I noticed that the cache for ‘index’ is
not stored in a directory named as the action, but directly at the root
level:
cache/localhost:3001/foo.cache

I expected it to be stored 1 level deeper, in
cache/localhost:3001/foo/index.cache

Is there a cleaner way to make this work?
Is this a bug?

Alain

Hi all,

I’m having problems trying to expire the ‘index’ action of a controller.

In short,
expire_action :action => ‘index’
doesn’t work, but
expire_fragment (url_for :action =>
‘index’).gsub(//index/,’’).split("://").last
works fine and deletes the cached page as expected.

I thought about this hack when I noticed that the cache for ‘index’ is
not stored in a directory named as the action, but directly at the root
level:
cache/localhost:3001/foo.cache

I expected it to be stored 1 level deeper, in
cache/localhost:3001/foo/index.cache

Is there a cleaner way to make this work?
Is thi