"Upcoming" blocks and the cache¶
"Upcoming" blocks list the next sessions on a page: "today at 7 pm", "tomorrow"… These words change every day, while the rest of the page stays the same for weeks. This page explains how the site reconciles the two, and what to do if a list seems out of date.
The cache, in a nutshell¶
To display quickly, the site keeps a ready-made copy of each page: this is the cache. The visitor receives this copy instead of a page built from scratch on every visit. On the centres' sites, this copy is kept for up to one week.
For an ordinary page, this causes no problem: when you change it, its copy is replaced. But a list of upcoming sessions kept for a week would still announce "today" the next day, or a session that has already taken place.
What the site does¶
The "Upcoming" block has its own copy, separate from the page's. The page keeps its copy for a week; the block, on the other hand, is rebuilt:
- every night at midnight, so that "tomorrow" becomes "today";
- at the end of the first session in the list, so that it disappears once it is over.
It is also rebuilt immediately when you save or delete:
- an event;
- an "Upcoming" block;
- an activity (its name, its colour…);
- the site colours.
So there is nothing for you to do: after you change an event, the "Upcoming" blocks on all pages take it into account on the next visit.
When the cache setting is not ideal¶
This relies on a setting of the site's cache plugin, LiteSpeed Cache. If it is not in place, the "Upcoming" blocks stay correct, but any page containing one is rebuilt much more often (at the latest every night, instead of once a week). The site stays correct; it is just a little less fast.
In this case, a message appears at the top of the admin: "LiteSpeed Cache is not optimally set up for the Upcoming blocks." It gives the setting to correct and a See the cache status link.
This message is meant for the site administrator
If you see it but cannot change the LiteSpeed Cache settings, pass it on to the administrator. You can hide it with Hide this notice.
If a list seems out of date¶
The list shows a session I have just cancelled, or does not show a new event. Check that the event has actually been updated (Update button). Then reload the site page with Ctrl + F5 (on a Mac: Cmd + Shift + R): your browser may have been keeping the old version.
The list is empty. No upcoming session matches the block's settings (Activities to be displayed, Number of days to display, Events to be excluded…), or the event is not published.
An error message appears instead of the list. The block's shortcode refers to an "Upcoming" block that does not exist (number copied wrongly, block deleted). Copy it again from the block's Shortcode to copy field (see Shortcodes).
Going further¶
- Events, activities and sessions: where the listed sessions come from.
- Shortcodes in Avada pages: how to place an "Upcoming" block on a page.
- Upcoming blocks: all the settings of a block.
- Show upcoming events on a page: step by step.