Learn how to use the Transients API to cache temporary data in the WordPress database. Using transients in your plugins is simple and requires only a few lines of code, and can help improve plugin performance when working with expensive queries and complex data sets.
- [Narrator] In this video we learn how…to use the Transients API to store temporary data…in the word press database.…The transients API enables us to store temporary data…in the word press options table.…For example if our plug in does something…like fetch RSS feeds, we can use transients…to cache the data and refresh it, say every hour.…By caching the data we improve plug in performance…and conserve server resources.…Here are the main functions that we'll be using…while working with the transients API.…
Get transient, set transient, and delete transient.…These functions do pretty much what you would expect.…They are very straightforward to use.…Let's look at an example that shows how to…use each of these functions.…Here is the plug in demo used in the previous tutorial…on customizing the word press loop.…This plugin shows how to use the WP_query class to create…a custom loop and display it with a short code.…As reminder here is where this plugin…does it's heavy lifting with WP_query.…
Currently this function calls WP_query…
- WordPress APIs
- Action and filter hooks
- Activating and deactivating plugins
- Plugin security
- Creating the directory and files
- Adding menus and the settings page
- Inserting custom functionality
- Testing and debugging WordPress plugins
- Creating widgets
- Managing users and roles
- Adding custom post types and taxonomies
- Working with custom fields and database queries
- Using APIs: Transients, HTTP, and REST
Skill Level Intermediate
WordPress: Developing Secure Siteswith Jeff Starr2h 38m Intermediate
1. First Steps
2. Plugin Basics
3. Building a WordPress Plugin
4. Essential Plugin Techniques
5. Extending Plugin Functionality
6. Advanced Plugin Techniques
Next steps1m 16s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.