Forum: Ruby caches_page

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
86d03e22c00011cea78af5e7a26bd9db?d=identicon&s=25 Kris Kohlstedt (kkohlstedt)
on 2007-07-22 07:01
I'm looking for something that has similar functionality to the
caches_page directive provided by rails but that caches a seperate based
on the params that are passed into the request.  For example if I have a
request and a request I'd like a seperate cache for each
of those requests.  Based on my experimentation with caches_page it
looks like all I get by default is a cache for the first of those 2
requests that is called.

Ideas?  Is there a simple way for caches_page to take into account the
params that are passed in?
F05add2c1c1b613e8e318e9360eac5c2?d=identicon&s=25 Travis D Warlick Jr (Guest)
on 2007-07-23 02:38
(Received via mailing list)
Hash: SHA1

Kris Kohlstedt wrote:
> params that are passed in?
Instead of calling, call  Rails will place '2' into
and it will cache the page into public/mycontroller/index/2.html

That is assuming you haven't deleted this line from the end of your

    map.connect ':controller/:action/:id'

- --
  Travis Warlick

  "Programming in Java is like dealing with your mom --
   it's kind, forgiving, and gently chastising.
   Programming in C++ is like dealing with a disgruntled
   girlfriend -- it's cold, unforgiving, and doesn't tell
   you what you've done wrong."
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -

This topic is locked and can not be replied to.