DevShed finishes off their series looking at creating the Twitter "badges" for your site, complete with latest post and profile pic, in this fifth and final part. This time they focus on caching the results.
You may find that Twitter will start cutting off your requests. At first that may seem confusing, but keep in mind that regardless of where the image actually appears, the request always originates from the IP address of the web server where the script is located. To circumvent this pitfall, we can add a caching feature to our Twitter signature image application.
Their caching method involves two steps: saving the user information including the latest tweet and making a local copy of the profile pic (avatar). The details are cached into a local file with the XML returned from the feed request.