Transient Love: How to give WordPress Transients a try

Transient Love: How to give WordPress Transients a try

Page caching is really good…

Most busy WordPress websites make use of some page caching plugin to ease processing load off servers and please site visitors with faster page loads. These WordPress caching plugins cache entire pages for serving up quickly.

…except when it isn’t

Sometimes, however, cached pages cannot be used. This is common for:

  • Membership sites, where user-specific content would make cached pages incorrect for most users.
  • Sites with rapidly updated page content, where cached pages would not keep up with visitors’ expectations.
  • Sites presenting unique content based on visitors’ location, browser, and other personal variables.

Partial page caching to the rescue

WordPress Transients - Suggests how code stored as transients have a limited lifespan
Data stored in WordPress transients are automatically removed after a specified time.

Even when the entire page should not be cached, there are usually certain parts of the page that rarely change and are still ripe for the benefits of caching. In this lesson, I will show you how to cache the global menu of your website — an element that rarely changes and is often found on every page of the site.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

Learn to love transients

Rather than reinventing the wheel, we will use built-in WordPress functions for data blocks we call “transients.” Let’s get to work in the video below!

EGWcRff1s4s

And there you have it — partial page caching.

Tags: