Implemented offline caching