{"action":"created","issue":{"url":"https://api.github.com/repos/MoOx/eslint-loader/issues/93","repository_url":"https://api.github.com/repos/MoOx/eslint-loader","labels_url":"https://api.github.com/repos/MoOx/eslint-loader/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/MoOx/eslint-loader/issues/93/comments","events_url":"https://api.github.com/repos/MoOx/eslint-loader/issues/93/events","html_url":"https://github.com/MoOx/eslint-loader/pull/93","id":160558029,"number":93,"title":"Add caching ability to the loader","user":{"login":"genintho","id":664857,"avatar_url":"https://avatars.githubusercontent.com/u/664857?v=3","gravatar_id":"","url":"https://api.github.com/users/genintho","html_url":"https://github.com/genintho","followers_url":"https://api.github.com/users/genintho/followers","following_url":"https://api.github.com/users/genintho/following{/other_user}","gists_url":"https://api.github.com/users/genintho/gists{/gist_id}","starred_url":"https://api.github.com/users/genintho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genintho/subscriptions","organizations_url":"https://api.github.com/users/genintho/orgs","repos_url":"https://api.github.com/users/genintho/repos","events_url":"https://api.github.com/users/genintho/events{/privacy}","received_events_url":"https://api.github.com/users/genintho/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-06-16T01:17:51Z","updated_at":"2016-08-04T20:05:21Z","closed_at":"2016-07-28T05:59:12Z","pull_request":{"url":"https://api.github.com/repos/MoOx/eslint-loader/pulls/93","html_url":"https://github.com/MoOx/eslint-loader/pull/93","diff_url":"https://github.com/MoOx/eslint-loader/pull/93.diff","patch_url":"https://github.com/MoOx/eslint-loader/pull/93.patch"},"body":"While webpack is great to pick up only incremental change, the compilation time at lunch can be very long. For our application, it takes minutes, which means it takes minutes before our tests can run, before we can deploy, before developer can start working when starting their day. \r\n\r\nI did similar changes to the coffee-loader, or the Uglify plugin, saving huge chunk of time.\r\n\r\nCache the eslint result into a file.\r\nThe input is hash using MD5 to detect changes.\r\n\r\n```json\r\n{\r\n    \"path.js\": {\r\n       \"hash\":\"7c451761c8712467357cd5750e303d1f\",\r\n       \"res\": \"what_ever\"\r\n}\r\n```\r\n\r\n\r\nThis cut 30% of my webpack build time.\r\n\r\nIf this PR is accepted, I am happy to update the documentation and write a few tests.\r\n\r\nFixes https://github.com/MoOx/eslint-loader/issues/82\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MoOx/eslint-loader/issues/comments/237667461","html_url":"https://github.com/MoOx/eslint-loader/pull/93#issuecomment-237667461","issue_url":"https://api.github.com/repos/MoOx/eslint-loader/issues/93","id":237667461,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T20:05:21Z","updated_at":"2016-08-04T20:05:21Z","body":"I think it would make sense to use the same caching strategy as [babel-loader uses](https://github.com/babel/babel-loader/blob/master/lib/fs-cache.js) since it’s been tested thoroughly."}}
{"actor":{"display_login":"gaearon"}}