Chapter 11: Fetching, Caching, and Regularly Updating External Site Data
After spending most of our time learning how to extend WordPress to allow site administrators and users to create local content, this chapter focuses on interacting with external data sources. While we did some work with displaying Twitter feed content in the Creating a new shortcode with parameters recipe in Chapter 2, Plugin Framework Basics, we had very little control over how this data was displayed since the content was shown in an IFrame. We also had no control over how this data was fetched and no way to cache it. The reason for this is that every user loading a page containing the Twitter feed shortcode fetched their own copy of the information to be displayed.
There are many different types of data out there that we could be interested in fetching, caching, and displaying. In this chapter, we will be focusing on two different types of information: RSS feeds and generic XML data.
More specifically...