Dumping browser cache when an error occurs

I’m thinking this should be part of base Rails. What do you guys think?

I added this to my application controller:


def set_expires_now

Then, when I do a rescue_from, part of the rescue is to call
set_expires_now which causes the response to tagged as uncacheable.
I’ve had trouble with my users getting a bad page from the server due to
some temporary glitch but when they “refresh”, they get the same page.
They have to do shift+refresh (on Firefox) to get a fresh page.

Also, I bumped into a problem with my AJAX replies… if I have an
exception and get the exception response, each attempt to get a new
fresh update results in a 304 response being returned and so the browser
just assumes that the old bad response is valid.