Cold Hard Data Cache – Or Saving Our Users Money!

Cold Hard Data Cache – Or Saving Our Users Money!

After that last post on SQLite, let’s explore one of the best things we can do with persisted data for the users of our mobile applications … provide a cache of data. And even better … the data cache that we’re going to give them is going to save them hard earned money! Alright – not even I can really extend the metaphor of data caching to saving money, at least not without really stretching, so let’s just dive right into data caching, shall we? What Is Caching & Why Is It Important? This probably goes without saying, but when I talk about caching data within a mobile application, I am talking about saving data downloaded from the internet to the mobile device for later use. This data is not necessarily meant to be kept around forever, but having it on the device will make the user experience much more enjoyable. There are two situations where this “more than fleeting, but not permanent data” comes in very useful. 1) Perceived performance. If we know what data our users will want to see next, we can download it before they want it. Our app will then seem much faster because the data is already there; loading it from a local cache is obviously much faster than downloading it from the internet. 2) Offline resilience. Users never stay within network reach. They’re out there climbing mountains, sitting on the beach, or hurtling through the air in an aluminum tube. But no matter what, they have come to expect that the app should still work, even when they’re offline. Providing a cache...