Forum: Ruby on Rails App ignores cached pages and re-caches them again and again.

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.
tharealpatton (Guest)
on 2007-04-05 22:43
(Received via mailing list)
I'm wondering if anyone has any ideas on what would cause rails to
write the cached page, but the app ignore the caches pages and instead
cache it again and again on every request?

I'm setting config.action_controller.page_cache_directory = RAILS_ROOT
+"/public/cache/", but it happens when I don't do that as well.

Any ideas would be greatly appreciated.

Thanks.

PJ
tharealpatton (Guest)
on 2007-04-06 03:45
(Received via mailing list)
Actually, correction, caching is fine when I don't try to set
config.action_controller.page_cache_directory.  I've read a couple
places now that this causes the issue.  Has anyone found a solution to
this?

PJ
Justin M. (Guest)
on 2007-04-06 20:06
tharealpatton wrote:
> Actually, correction, caching is fine when I don't try to set
> config.action_controller.page_cache_directory.  I've read a couple
> places now that this causes the issue.  Has anyone found a solution to
> this?
>
> PJ

As a work around, symlink your cache dir to the dir where you want it

rm -rf /home/app/tmp/cache
ln -s /real/cache/dir /home/app/tmp/cache
Russell N. (Guest)
on 2007-04-06 20:42
(Received via mailing list)
You need to get the server to actually serve the pages from the
relocated
cache. This will depend on what server you're running on. The only
configuration I'm familiar enough with is Apache. Editing the rewrite
conditions in public/.htaccess will get you want you want with it. You
might
try Googling for solutions on the other server platforms.

RSL
This topic is locked and can not be replied to.