Javascript Entity API client + resource caching