issue with object cache and WP Engine

WordPress Event Management, Calendars & Registration Forums Report A Bug issue with object cache and WP Engine

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 7 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28842

    Hey Stephen. I found an issue I was able to track to being object caching on WP Engine being the problem. If you go to http://visitplacer.wpengine.com/events/ and scroll down you will see a list of events. They have dates and date ranges for each event. Now click the “this month” button. You will be presented with a list of dates for this month but the dates/date ranges disappear. I spoke with WPE support and when we disable the object cache this issue goes away. The obviously don’t want to disable object caching for the site so I’m reaching out for any advice.

    Ali Zamanian
    #28846

    Hi Ali,

    You’ve probably already checked this but is the same template file being used? I strongly suspect it is, given the object cache is unlikely to change that.

    Assuming it is, its probably worth inspecting the $post global. This should be an ordinary post object but with additional properties for occurrence ID, start and end date times. This data is obtained when the DB query for events (post type) joins the event dates (eo_events) table.

    At a guess what could be happening is the object cache is caching the post data but not the additional event data, and that its presence in the cache prevents it from pulling out the data again.

    What doesn’t fit with that is the events page (with no filters applied) consistently work – does that page not hit the cache?

    Stephen Harris
    #28853

    Hey Stephen. It’s definitely hitting the same template file. I’m using this plugin which adds some info to the admin bar https://wordpress.org/plugins/helpful-information/

    Your guess makes sense to me. I’ll do some var dumping and see if that is indeed the issues. For the filtered events I’m using this class since the information in the sidebar is effected by the query results. Thing of this site like Amazon. On the sidebar as you go down the rabbit hole (filtering) the returned results change relative to what you get back. I’m dropping a gist to the class I’m using. It works perfectly for everything except the event dates https://gist.github.com/zzramesses/aa4cea7bfc505e32b3a57364d6a4b5e4

    Ali Zamanian
    #28854

    That snippet would explain it. In it you are quering for post IDs only. An event (post) represents an event series, so all events share the same ID. With just a post ID you lose any date contect.

    Try removing the ‘fields’ => ‘ids’ and get_post() call.

    I don’t see how the object cache would impact this, however

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.