{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3597","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3597/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3597/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3597/events","html_url":"https://github.com/eslint/eslint/pull/3597","id":103933112,"number":3597,"title":"New: Implement cache in order to only operate on changed files since previous run. (fixes #2998)","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":3,"created_at":"2015-08-30T16:34:30Z","updated_at":"2015-08-30T20:08:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eslint/eslint/pulls/3597","html_url":"https://github.com/eslint/eslint/pull/3597","diff_url":"https://github.com/eslint/eslint/pull/3597.diff","patch_url":"https://github.com/eslint/eslint/pull/3597.patch"},"body":"This is the first draft of adding a cache to Eslint.\r\n\r\n- The basic detection of a changed file is deferred to file-entry-cache.\r\n- The file cache is stored in the current working directory (`process.cwd()`) where the command is executed. The file created is called `.eslintcache`\r\n- The cache only stores files that successfully passed validation. The ones that failed are removed to guarantee they will be processed the next run.\r\n\r\nan easy way to test is run this in the project\r\n\r\n```bash\r\n./bin/eslint.js lib/ --cache # this will take 3.5s aprox\r\n\r\n./bin/eslint.js lib/ --cache # this will take 150ms aprox. Obviously because the results are cached\r\n\r\n# touch a couple of files, introduce some errors on purpose\r\n./bin/eslint.js lib/ --cache # this will take 200ms aprox. \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/136180024","html_url":"https://github.com/eslint/eslint/pull/3597#issuecomment-136180024","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3597","id":136180024,"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},"created_at":"2015-08-30T20:08:43Z","updated_at":"2015-08-30T20:08:43Z","body":"@lo1tuma Yeah I agree with @platinumazure \r\n\r\nIt won't be worse than no cache, I have being using this in [eslinter](https://www.npmjs.com/package/eslinter) for a while with no major issues"}}