Offline resource caching