API Better implementation of caching / rate limiting