All Courses > Up and Running > Chapters > Getting to Know the WordPress Transients API

Getting to Know the WordPress Transients API

Key Takeaways:

Caching is a key process for speeding up website performance. It takes difficult-to-retrieve data (such as extensive calculations or complex database queries), saves it, and serves the saved values rather than running the calculations again.
The Transients API is WordPress's solution for object caching: caching individual pieces of data rather than whole webpages. The Transients API allows developers to cache objects freely, without worrying about the specific tools available on a given web server.
Use of the transients API is relatively simple, with two main functions: get_transient() and set_transient(). Each transient is a piece of data with a specific expiration date.

Computer performance revolves, in large part, around the idea of caching: "storing something in a more-ready and quicker-to-access state," so that you can more quickly deliver the final result.

To take a real-life example: your kitchen cupboard is a kind of cache. You've got sou...