setup api caching