-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customer data not invalidated private content after logged in #13
Comments
+1 |
+1 Thank you |
So I did some investigating (due to an issue where it didn't seem to log you in properly). Basically — after logging in — it takes you to Now, section.xml contains the following:
Interesting to note is (apart from the Ukrainian heroes bit), the Anyhow, if I navigate away before the 5 second form post, it looks like I'm still logged in, but when I add anything to my cart, I appear to be logged out. Initially I thought I had to hit any non-Varnish page to log me out, but it only seems to happen if I add something to my cart. I can only assume that by adding something to the cart, before your previous customer local storage is cleared, something breaks and you are logged out. This begs the question, why the 5 second wait? |
@erfanimani , thank you for your info.
|
Ah I see — thanks @magefan I will experiment with improving that functionality, to prevent the need for the 5 second wait, and prevent things from breaking when you navigate away before the 5 second load - my website loads very fast ;) / sarcasm Something along the lines of CC @nntoan |
@magefan I believe there is something we don't know yet about the cache-hole punching of Magento 2. I have a same situation in the past and there is no way to invalidate the private content through Yes, in theoretically if we don't set any section, then it MUST invalidate everything but in fact... And if you noticed, Magento 2 themselves don't use something like |
@nntoan we will add your fix to our code in a few days and will release a new version. |
@erfanimani , thank you, we will review your changes. I think the new version will be available on Monday. |
Magento Commerce 2.2.1 & 2.2.2
FPC: Varnish
The current
sections.xml
does not invalidate customer section after the redirect. (Welcome message..etc is blank)But if we add the specified section into
sections.xml
, then it will invalidate private content properly. For e.g:The text was updated successfully, but these errors were encountered: