{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4943","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4943/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4943/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4943/events","html_url":"https://github.com/eslint/eslint/issues/4943","id":126549134,"number":4943,"title":"Clarify documentation for caching","user":{"login":"gronke","id":473924,"avatar_url":"https://avatars.githubusercontent.com/u/473924?v=3","gravatar_id":"","url":"https://api.github.com/users/gronke","html_url":"https://github.com/gronke","followers_url":"https://api.github.com/users/gronke/followers","following_url":"https://api.github.com/users/gronke/following{/other_user}","gists_url":"https://api.github.com/users/gronke/gists{/gist_id}","starred_url":"https://api.github.com/users/gronke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gronke/subscriptions","organizations_url":"https://api.github.com/users/gronke/orgs","repos_url":"https://api.github.com/users/gronke/repos","events_url":"https://api.github.com/users/gronke/events{/privacy}","received_events_url":"https://api.github.com/users/gronke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/accepted","name":"accepted","color":"0052cc"},{"url":"https://api.github.com/repos/eslint/eslint/labels/documentation","name":"documentation","color":"5319e7"},{"url":"https://api.github.com/repos/eslint/eslint/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-14T00:30:53Z","updated_at":"2016-05-23T02:29:32Z","closed_at":null,"body":"A [cache file is deleted](https://github.com/eslint/eslint/blob/201806697373e3b1eb4fbda012496e6343323758/tests/lib/cli-engine.js#L1555) when both conditions apply:\r\n1.  `cacheFile` option is pointing to an existing file\r\n2. `cache` option is set to `false`\r\n\r\nIn my opinion this behavior is a little confusing, because the combination of `--cache false` and some valid path as `--cache-file` option is not likely. I would prefer to manually delete the specified cache file instead of running eslint once with at least the parameters from above and then run it again to re-create the cache. In case of the default `.eslintcache` file the behavior makes sense in this context when only `--cache false` option is set, but I would not expect the cache feature to create or delete anything when it is disabled.\r\n\r\nMaybe an option, that allows to skip reading the cache file while results were still written to the cache file, could address the same need in a more intuitive way. (e.g. `--flush-cache`) \r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29858560-clarify-documentation-for-caching?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/220875279","html_url":"https://github.com/eslint/eslint/issues/4943#issuecomment-220875279","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4943","id":220875279,"user":{"login":"dominicbarnes","id":160197,"avatar_url":"https://avatars.githubusercontent.com/u/160197?v=3","gravatar_id":"","url":"https://api.github.com/users/dominicbarnes","html_url":"https://github.com/dominicbarnes","followers_url":"https://api.github.com/users/dominicbarnes/followers","following_url":"https://api.github.com/users/dominicbarnes/following{/other_user}","gists_url":"https://api.github.com/users/dominicbarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/dominicbarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominicbarnes/subscriptions","organizations_url":"https://api.github.com/users/dominicbarnes/orgs","repos_url":"https://api.github.com/users/dominicbarnes/repos","events_url":"https://api.github.com/users/dominicbarnes/events{/privacy}","received_events_url":"https://api.github.com/users/dominicbarnes/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T02:29:32Z","updated_at":"2016-05-23T02:29:32Z","body":"I recently ran into an issue when using linter-eslint in Atom.\r\n\r\nI was using `--cache` in my own repo/project, but linter-eslint is running w/o specifying `cache: true` and my `.eslintcache` file was being deleted for no apparent reason. This was confusing to me, and I never expected that leaving out `cache: true` would delete the cache from previous runs.\r\n\r\nNow that I've read through this thread, I can kinda see why it is the way it is, but that didn't make this experience any less confusing."}}
{"actor":{"display_login":"dominicbarnes"}}