I have an app with Devise and Alchemy CMS and when I sign in, the button Login should change to Logout but it doesn't. I think that HTTP caching is enabled. If I logout, I get redirected to the home page and in the request header I can see this:
/users/sign_out
Status Code: 302
cache-control:no-cache
but if I go to another page the button still says "Logout". If I refresh the home page I see this in the header:
/
Request Method:GET
Status Code:200 (from disk cache)
cache-control:public
last-modified:Mon, 17 Dec 2018 19:32:08 GMT
If I login and go to another page the button says Login. In the header I see this:
/some/other/url
Request Method:GET
Status Code:200 (from disk cache)
cache-control:public
last-modified:Mon, 17 Dec 2018 19:32:08 GMT
Is there a way I could fix that?
I had to upgrade to 4.0-stable which adds
must_revalidateto the headers and overwriterender_fresh_page?method https://github.com/AlchemyCMS/alchemy_cms/blob/4.0-stable/app/controllers/alchemy/pages_controller.rb#L192to look like this:
app/controllers/alchemy/pages_controller_extension.rb