Current Status: compatible
WP Super Cache is a well-known plugin from the Automattic team focused on improving the performance of a WordPress site. Let’s look at how it works with The Events Calendar and find out what we need to do to configure the plugin so that the calendar is properly cached for the fastest loading possible.
What you need
- The Events Calendar
- WP Super Cache
- The slug for your calendar and events (e.g.
/events
and/event
)
👋 Throughout this article, we will be using /events
and /event
for the calendar and event single slugs, respectively. Yours may differ depending on your plugin settings.
Advanced settings
Once WP Super Cache is installed and has been activated on your site, navigate to Settings → WP Super Cache from the WordPress dashboard. The first tab that we’ll use is Advanced. Look for the “Accepted Filenames & Rejected URIs” option on that page.
The first part of the page allows you to select from a list conditional tags that will dynamically disable caching on pages that meet each condition. For example, selecting the “Single Posts (is_single)” option disables cache on all posts. This is an excellent and convenient way to prevent caching on a set of pages rather than identifying them individually.
Below that is a textarea that allows you to specify strings that, when matched, also prevent caching on pages that meet that criteria. For example, if you want to prevent caching on all single event pages, enter /event/
and all events will be excluded from caching since they all includes /event/
in the URL. Enter one string per line and be sure to save your settings before moving ahead.
While you are in the advanced settings section, scroll all the way down to the Expiry Time & Garbage Collection.
Whatever combination of settings is in place in that section, make sure the cache is refreshed every 12 hours at most.
Contents settings
Next, we need to “purge” the cached files on the site so that our settings from the Advanced section take effect. To do that, navigate to the Contents tab in the WP Super Cache Settings.
Scroll down the page and click Delete Expired button. Once that process completes, do the same for the Delete Cache button.
This is everything that you need to do to prevent WP Super Cache from caching any content created by The Events Calendar.