Complete draft of rails api caching