{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda/issues/1853","labels_url":"https://api.github.com/repos/conda/conda/issues/1853/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda/issues/1853/comments","events_url":"https://api.github.com/repos/conda/conda/issues/1853/events","html_url":"https://github.com/conda/conda/issues/1853","id":118302507,"number":1853,"title":"[FR] Conda should have more aggressive HTTP caching","user":{"login":"rmcgibbo","id":641278,"avatar_url":"https://avatars.githubusercontent.com/u/641278?v=3","gravatar_id":"","url":"https://api.github.com/users/rmcgibbo","html_url":"https://github.com/rmcgibbo","followers_url":"https://api.github.com/users/rmcgibbo/followers","following_url":"https://api.github.com/users/rmcgibbo/following{/other_user}","gists_url":"https://api.github.com/users/rmcgibbo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmcgibbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmcgibbo/subscriptions","organizations_url":"https://api.github.com/users/rmcgibbo/orgs","repos_url":"https://api.github.com/users/rmcgibbo/repos","events_url":"https://api.github.com/users/rmcgibbo/events{/privacy}","received_events_url":"https://api.github.com/users/rmcgibbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-23T00:58:32Z","updated_at":"2015-11-23T01:02:30Z","closed_at":null,"body":"It would be nice to have more aggressive HTTP caching in conda (and repo.continuum.io and conda.anaconda.org), especially for the `fetch_index` call that occurs at the beginning of many user interactions. With a couple channels added, this often takes ~1000ms for me.\r\n\r\n1. Currently, my understanding is that some caching is used only when the user supplies a special flag (`--use-index-cache`), which I assume is rare. But even this cache is pretty ineffective.\r\n2. On anaconda.org, the `repodata.json.bz2` file is not served with any ETag or Expires headers.\r\n3. On `https://repo.continuum.io/`, the `repodata.json.bz2` file is served with ETag, but not Expires headers. Without the Expires headers, you can't avoid a trip to the server, even if the response is cached.\r\n4. Instead of manually operating a cache, as is done in `fetch_repodata()`, all of this could be done transparently with a library like [CacheControl](http://cachecontrol.readthedocs.org/en/latest/index.html). IIRC, this is what pip does as well. But obviously it requires the right HTTP headers, especially Expires."},"comment":{"url":"https://api.github.com/repos/conda/conda/issues/comments/158824254","html_url":"https://github.com/conda/conda/issues/1853#issuecomment-158824254","issue_url":"https://api.github.com/repos/conda/conda/issues/1853","id":158824254,"user":{"login":"rmcgibbo","id":641278,"avatar_url":"https://avatars.githubusercontent.com/u/641278?v=3","gravatar_id":"","url":"https://api.github.com/users/rmcgibbo","html_url":"https://github.com/rmcgibbo","followers_url":"https://api.github.com/users/rmcgibbo/followers","following_url":"https://api.github.com/users/rmcgibbo/following{/other_user}","gists_url":"https://api.github.com/users/rmcgibbo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmcgibbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmcgibbo/subscriptions","organizations_url":"https://api.github.com/users/rmcgibbo/orgs","repos_url":"https://api.github.com/users/rmcgibbo/repos","events_url":"https://api.github.com/users/rmcgibbo/events{/privacy}","received_events_url":"https://api.github.com/users/rmcgibbo/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T01:02:30Z","updated_at":"2015-11-23T01:02:30Z","body":"(cc https://github.com/conda/conda/issues/400#issuecomment-41204714)"}}