Forum: Ruby on Rails Caching with default routes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ryan W. (Guest)
on 2006-01-05 21:09
(Received via mailing list)
Hi all. I'm trying to implement caching for the main page on a site.
In the routes.rb file I have:

map.connect '', :controller => 'respond', :action => 'issue'

The 'issue' action finds the most recently published issue (say id 5)
and sets the :id = 5. Then it renders the page for issue id 5.

The problem is that it won't actually cache because the url show
"www.domain.com" not "www.domain.com/respond/issue/5" even though
that's what's being rendered.

If I manually type "www.domain.com/respond/issue/5", the cache is
created, but then it not used when someone visits using
"www.domain.com".

Is there any way to enable caching (page or action) in this scenario?
Thanks for the help.

--Ryan
This topic is locked and can not be replied to.