Implements caching of http requests (all but api)