views:

234

answers:

1

I have a RoR application (ruby v1.8.7; rails v2.3.5) that is caching a page in the development environment. This wouldn't be so much of an issue, but the cached page's A elements are incorrect.

I haven't made any changes to the development.rb file and I haven't knowingly added any caching commands to the controllers.

I've tried clearing the browser's (Firefox 3.5 on OSX) cookie and page caches for this site (localhost). I've also restarted Mongrel. Nothing seems to help.

What am I missing?

A: 

This line in development.rb ensures that caching is not happening.

config.action_controller.perform_caching             = false

You can clear the Rails cache with

Rails.cache.clear

That said - I am not convinced this is a caching issue. Are you making changes to the page and not seeing them reflected? You aren't perhaps looking at the live version of that page? I have done that once (blush).

Update:

You can call that command from in the console. Are you sure you are running the application in development?

The only alternative is that the page that you are trying to render isn't the page that is being rendered.

If you watch the server output you should be able to see the render command when the page is rendered similar to this:

Rendered shared_partials/_latest_featured_video (31.9ms)
Rendered shared_partials/_s_invite_friends (2.9ms)
Rendered layouts/_sidebar (2002.1ms)
Rendered layouts/_footer (2.8ms)
Rendered layouts/_busy_indicator (0.6ms)
Apie
That line is present in the development.rb file.Where do I add that command?Yes. I made changes to the page that should have been displayed if the page was 'live'--This is how I discovered the caching issue.
Craig
It appears to have been an idiotic mistake on my part. *blush*Thanks for your time and assistance--I did learn a lot.
Craig
No problem. Would love to know what the issue was - these things are always pretty obscure - most of all when you are making a idiotic mistake - I figure i'm bound to make the same one sometime soon :)
Apie
I've nested routes for two related models. On one page, I use the edit_parent_child_path in the link_to. Unfortunately, I omitted the parent's reference; it was edit_parent_child_path(child), it needed to be edit_parent_child_path(@parent,child).
Craig
Ah, thanks - thats bound to happen to me sometime.
Apie