how to fix caching

Hi all,

Basically I need to turn off caching on 100%, but maybe something else
will help.

I have a next problem -

in main layout:
<% if current_user and current_user != :false %>
  <!-- html for logged in user, Hi user... -->
<% else %>
  <!-- html for not logged in user, Login please... -->
<% end %>

if I login all works fine, I see "Hi user", but when I press logout
link, page redirected to "/", and I see same "Hi user" text. (when I
reload page with ctrl+F5 page reloaded to valid, with "login please"
Server returns 304, but how this can possible? page must be with other

I use next tags in layout -
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="CACHE-CONTROL" content="no-cache">

and put next cofig into the \config\environments\ -
config.cache_classes = false
config.action_controller.perform_caching = false

I see this bug in WEBrick (dev) and in Mongrel (production), with same
configs and templates.

How I can say to browser always reload a html? or to ROR - not use 304
status, always re-render html?

He, found a method to fix this:
in application.rb -

  before_filter .... , :set_header

  def set_header
    # set modify date to current timestamp
    response.headers["Last-Modified"] = CGI::rfc1123_date( -
    # set expiry to back in the past
    # (makes us a bad candidate for caching)
    response.headers["Expires"] = 0
    # HTTP 1.0 (disable caching)
    response.headers["Pragma"] = "no-cache"
    # HTTP 1.1 (disable caching of any kind)
    # HTTP 1.1 'pre-check=0, post-check=0' (IE specific)
    response.headers["Cache-Control"] = "no-cache, no-store,
must-revalidate, pre-check=0, post-check=0"

Good in IE and FF, but sometimes not helps in Opera.