Open raupie opened 5 years ago
Ok I dive a bit on this one.
This is not an easy fix, and there is no diff between Enterprise or Standard.
This is a cache
issue.
Key is the env var HTTPCACHE_PURGE_TYPE
this env var is set on the Vhost (nginx) so in CLI (during the install process) the cache is set without it to local
Then when you go on your browser the purge does not work. If you clean the cache it works.
Complexity is that, if we put the HTTPCACHE_PURGE_TYPE
env var in the env of the container, the opposite will happen, dev mode will try to purge in http
and not in local.
cc @andrerom not sure we have a simple fix here. Maybe we could just provide that information in the doc.
Any other idea?
Well.. Typically we try to share cache between dev and prod if they share db, to make sure it stays in sync on changes, but I know you have misc reasons to not do that.
Varnish does not work with ezplatform enterprise edition. Particularly with admin ui purge events. I've tested this using ezlaunchpad by initializing a ezplatform project and an ezplatform-ee project.
Test 1: ezplatform standard edition. Works as expected.
Test 2: ezplatform-ee edition. Varnish is broken. Purge not working. Logged in session is being cached.
So it appears to me that ezplatform-ee is not purging content. When logged into the admin ui I can see that varnish is caching the homepage when in ezplatform project that is not happening as expected since Varnish shouldn't be caching content containing cookies. When I log out of admin ui the varnish cache returns to the original cache without the new content.
The other side affect I'm noticing ONLY when using the ezplatform-ee project is when running an
~/ez down && ~/ez create
to rebuild the environments that leaving the admin ui logged in will cause varnish to cache a composer error message. If I log out of admin_ui then run the ez commands varnish doensn't cache that error. I believe it has something to do with the admin ui notifications trying to hit the site while it's down and varnish turns on it sees that request and caches it. However I've tested this on the ezplatform project and it doesn't happen there. Seems isolated to enterprise edition only.