{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4255","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4255/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4255/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4255/events","html_url":"https://github.com/eslint/eslint/pull/4255","id":113211086,"number":4255,"title":"Update: --cache-file can take a directory where to store the cache. Fixes #4241","user":{"login":"royriojas","id":131290,"avatar_url":"https://avatars.githubusercontent.com/u/131290?v=3","gravatar_id":"","url":"https://api.github.com/users/royriojas","html_url":"https://github.com/royriojas","followers_url":"https://api.github.com/users/royriojas/followers","following_url":"https://api.github.com/users/royriojas/following{/other_user}","gists_url":"https://api.github.com/users/royriojas/gists{/gist_id}","starred_url":"https://api.github.com/users/royriojas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/royriojas/subscriptions","organizations_url":"https://api.github.com/users/royriojas/orgs","repos_url":"https://api.github.com/users/royriojas/repos","events_url":"https://api.github.com/users/royriojas/events{/privacy}","received_events_url":"https://api.github.com/users/royriojas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/cla%20found","name":"cla found","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-25T07:06:38Z","updated_at":"2015-10-26T19:34:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/4255","html_url":"https://github.com/eslint/eslint/pull/4255","diff_url":"https://github.com/eslint/eslint/pull/4255.diff","patch_url":"https://github.com/eslint/eslint/pull/4255.patch"},"body":"This is a first pass. @nzakas I guess is done in a way that can be backwards compatible and won't require the introduction of a new --flag\r\n\r\nbut we might want to consider deprecating `--cache-file` and change it to `--cache-location`, since now that name makes more sense.\r\n\r\nso basically:\r\n\r\n```bash\r\n# when executed from a directory like /path/to/my/project\r\neslint src/**/*.js --cache --cache-file='/Users/name/.eslintcache/' # notice the final `path.sep`\r\n```\r\n\r\nwill create a cache file like this\r\n\r\n```bash\r\n/Users/name/.eslintcache/.cache_hashOfCWD # where hashOfCWD is the hash of the directory  /path/to/my/project\r\n```\r\n\r\nThis will allow reuse a single location for the caches from different projects and still receive the benefits of the cache"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/151259808","html_url":"https://github.com/eslint/eslint/pull/4255#issuecomment-151259808","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4255","id":151259808,"user":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T19:34:29Z","updated_at":"2015-10-26T19:34:29Z","body":"Yeah agreed. We can probably add `cache-location` now and have it do the same thing as `cache-file`, and just say we're deprecating `cache-file`.\r\n\r\nWill this always use directories now? Or does it support both files and directories?"}}