Support

Home Forums Event Espresso Premium EE4 Conflict with Varnish Cache on Dreampress

EE4 Conflict with Varnish Cache on Dreampress

Posted: July 3, 2014 at 1:11 pm


CMNtv

July 3, 2014 at 1:11 pm

Wordpress 3.9.1
EE 4.2.7
EE Calendar 3.0.0
Recently Upgraded
http://www.cmntv.org

I’ve been trying to determine the slowness of my site on Dreamhost’s Dreampress managed hosting. Their support suggested one of my plugins was preventing the Varnish Cache from being delivered, thus slowing down the site. I tested turning on and off each plugin along with testing feedback from this test site:

http://www.isvarnishworking.com

I found that I receive the following error message when EventEspresso is active, and the site slows down significantly, indicating Varnish cache is being prevented from delivering its cache:

The application is sending cache headers that are telling Varnish not to serve that content from cache. This means you’ll have to fix the cache headers the application is sending to Varnish. A lot of the time those headers are Cache-Control and/or Expires.
The application is setting a session cookie, which can prevent Varnish from serving content from cache. This means you’ll have to update the application and make it not send a session cookie for anonymous traffic.

Any help or suggestions are greatly appreciated.

Thanks
Chris Weagel
CMNtv.org


Lorenzo Orlando Caum

  • Support Staff

July 3, 2014 at 1:25 pm

Hi Chris,

We set those up as caching services will break the registration process in Event Espresso.

Caching services are typically used on static content such as WordPress posts or pages.

The registration process is dynamic and is similar to a shopping cart experience on an ecommerce site:

https://eventespresso.com/wiki/setup-nocache-exclusion-rules-event-espresso/


Lorenzo


CMNtv

July 3, 2014 at 2:32 pm

I’m not quite sure that’s the problem. When I look at cmntv.org with EE4 enabled using the Developer tools, I get two errors:

GET http://www.cmntv.org/wp-content/plugins/event-espresso-core-reg-3/templates/global_assets/css/espresso_default.css?ver=4.2.7.p (index):14
GET http://www.cmntv.org/wp-content/plugins/event-espresso-core-reg-3/templates/global_assets/scripts/espresso_core.js?ver=4.2.7.p

Do these factor into it?

Thanks
Chris Weagel


Lorenzo Orlando Caum

  • Support Staff

July 3, 2014 at 3:28 pm

Hi Chris,

Caching services will break your registration process on your site so it would be best to exclude the Event Espresso pages.

For those links, they look like they are 404.
Those links have a 3 at the end of the Event Espresso plugin folder.

Could you try reinstalling your EE4 by downloading a new copy from your account?

https://eventespresso.com/users/cmntv-chris/


Lorenzo


CMNtv

July 3, 2014 at 3:32 pm

I will re-install EE4.

However, the pages that require non-caching have been set and successful registrations take place. I suspect there is something else in EE interfering with the Varnish cache. I base that on testing my plugins with http://www.isvanishworking.com and coming up EE returning errors.

I am not trying to remove any EE pages from the do not cache list.


Lorenzo Orlando Caum

  • Support Staff

July 3, 2014 at 3:47 pm

Hi,

Shortly after we introduced Event Espresso 4, we found that members running caching services/plugins such as W3 Total and WP Super Cache could not register.

For a while, we recommended adding the Event Espresso pages to the no-cache/ but this depended on the member setting this up correctly.

Therefore, we introduced no-cache headers to all Event Espresso pages. This covers members who install a caching plugin and do not manually add the no-cache rules.

With this in mind, Varnish should cache your site except for the Event Espresso pages (as this will break registrations checkout).

Are you saying that the Varnish doesn’t work at all when Event Espresso is activated?


Lorenzo


CMNtv

July 3, 2014 at 3:52 pm

To the best I can determine, EE is causing Varnish not to cache.
Again, this is based on shutting off all other plugins, then turning on only EE and testing the site with http://www.isvarnishworking.com

My hosting is managed by Dreamhost. I have support lines open with them about this problem as well as the limited pages EE wants listed as No Cache.
They told me they suspect a plugin is preventing Varnish from delivering the cache.

Please see my previous messages about the error returned by this testing site when I have EE enabled.

Thank you for all the support and for a great plugin otherwise. I just need better performance.


Lorenzo Orlando Caum

  • Support Staff

July 3, 2014 at 4:34 pm

Hi,

This looks like the issue that you are running into:

https://discussion.dreamhost.com/thread-139506-post-171259.html#pid171259

It looks like Varnish stops running if cookies are used.

We use session cookies to track information for the current registrations. Are there any other caching methods available other than Varnish?


Lorenzo

The support post ‘EE4 Conflict with Varnish Cache on Dreampress’ 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.

Event Espresso