Complete Guide to WordPress Transients
The WordPress Transients API is a portion of the WordPress codebase that allows plugin and theme developers to store cached data. This data will eventually expire, after which it’s automatically deleted. Transients are often used to cache data from external API requests that might introduce latency, or from slow-running database queries in which running the query against the actual database on every page load would decrease the site’s performance.
When you save data into a transient, the data is saved into the wp_options table of the WordPress database. At first glance, this makes the Transients API seem similar to the Options API. The main difference is that each transient is given an expiration, after which it will automatically be removed from the database. This is not the case when saving an option in WordPress.