Hi,
In the process of troubleshooting a different problem, my hosting company, DreamHost, noted that the Varnish cache they provide was not working. They suggested to me that the no-cache seemed to be coming from a plugin.
I spent some frustrating time this morning activating and deactivating all my plugins. Sometimes after deactivating EE4 and the Braintree gateway the no-cache situation would go away and all would be good, but sometimes that wasn’t the case. I never did find a combination of active and deactivated plugins that would work or not work all the time, so I went back to DreamHost and asked for further data. In response, they tell me they believe the problem comes from EE4. I’m going to paste their response below for your analysis, as this appears to be well beyond my capabilities as a user.
—–
Thank you for reaching back out to us. Sorry to hear you’re still having
problems with the server cache for the ninthdistrictpta.org site. I’ll be
happy to assist you further today!
And from what I found out, the Event Espresso plugin is the one creating
the cookie that’s conflicting with the server cache. For this case, I
would recommend disabling it to help get the server cache working and
speed up the site.
From there, you can also check its cookie with the plugin developer, so
they can update the Event Espresso plugin and make its cookie
cache-compatible. Once you also have the details from the plugin
developer, please let us know so we can check the changes or updates that
needs to be applied for the site or the plugin.
I would recommend having them check
the following plugin files, that’s creating a cookie:
But when the plugin is deactivated, it shows the following result after
clearing the cache. The first curl command is expected to show a MISS
status, as the server cache was cleared in the test. The second curl
command now showed a HIT status, after the server cache was re-created
after the first curl command:
Kindly provide them the details above, to help them check which cookie
created by the plugin is conflicting or disabling the server cache. If
you’d like to test it too, you can disable the Event Espresso plugin,
then clear the server cache using the steps from the link below:
Once cleared, you can then test the server cache by using the curl
command twice on the site via an online tool like the one from the https://tools.keycdn.com/curl link, and check the x-cache status on the
second curl command results.
Yes, we set a no-cache cookie when using Event Espresso.
Originally we tried to restrict that to only happen on specific pages, however, we ran into multiple issues where sessions were being wiped on X requests and breaking registrations.
ummm….that’s stunning. So making our entire site never cached when EE4 is active is the best solution? I don’t recall that being disclosed anywhere – did I miss something? Seems like a situation that would make a lot of us admins unhappy.
So making our entire site never cached when EE4 is active is the best solution?
When Event Espresso shortcodes can be placed literally anywhere on the site and loaded in ways we can’t detect prior to the page loading, yes. It’s either that or the admin runs into issues with sessions breaking and registrations stop working with the current setup.
I don’t recall that being disclosed anywhere – did I miss something? Seems like a situation that would make a lot of us admins unhappy.
You can’t cache eCommerce requests so no, no disclosure as such. For Event Espresso to function the requests for each individual user can not be cached.
I’ll open a discussion to see if we have any plans to change this in the future.
The support post ‘EE4 setting no-cache?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.