Caching month view HTML in transients

We've added a new setting to The Events Calendar to help Month View load quickly for your site visitors. Month View may load slowly on some sites for a few reasons- for example, if there are many events showing on each day, or if your hosting plan is not powerful enough.

You'll find a new option available under Events > Settings > Display called Enable the Month View Cache. Enabling that option will save the HTML for your Month View in a transient. That way, the events don't have to be pulled from the database everything the site is visited- instead, the calendar displays the saved HTML fragment and thus loads faster.

This cached version will expire if a new event is saved, Events settings are saved, or any WordPress options are saved. Otherwise, the fragment will last for 3600 seconds (one hour) by default. You can change that time as needed by hooking into
tribe_events_month_view_transient_expiration and returning a different number of seconds.

If you are working on customizing your Month View's template design, you'll probably want to disable this setting. That way you'll always get the latest version of your frontend template. You can always turn the setting back on once you're done with your work.