Cover by Joe Conway, Aaron Hillegass

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Advanced Caching

The caching mechanism for Apple’s top songs feed is pretty simple: each time a new feed is fetched, it completely replaces the old feed in the cache. This makes sense for this particular feed – we aren’t maintaining a history of top songs, just showing the current top ten.

The Big Nerd Ranch forum feed is a little different. Every time a new feed is fetched, you are getting the last day’s worth of posts. If we cached this feed in the same way as Apple’s feed, we wouldn’t be able to maintain a history. Also, the forum feed can be pretty large since we get a lot of posts in a day, so it takes a few moments to load the feed. It would be better for the user if they could see a list of cached posts as soon as they open the application ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required