Add caching and offline support.