{"action":"created","issue":{"url":"https://api.github.com/repos/dadi/cache/issues/28","repository_url":"https://api.github.com/repos/dadi/cache","labels_url":"https://api.github.com/repos/dadi/cache/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/dadi/cache/issues/28/comments","events_url":"https://api.github.com/repos/dadi/cache/issues/28/events","html_url":"https://github.com/dadi/cache/pull/28","id":334559858,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NTAyNTUx","number":28,"title":"Add in-memory index to file handler","user":{"login":"eduardoboucas","id":4162329,"node_id":"MDQ6VXNlcjQxNjIzMjk=","avatar_url":"https://avatars3.githubusercontent.com/u/4162329?v=4","gravatar_id":"","url":"https://api.github.com/users/eduardoboucas","html_url":"https://github.com/eduardoboucas","followers_url":"https://api.github.com/users/eduardoboucas/followers","following_url":"https://api.github.com/users/eduardoboucas/following{/other_user}","gists_url":"https://api.github.com/users/eduardoboucas/gists{/gist_id}","starred_url":"https://api.github.com/users/eduardoboucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduardoboucas/subscriptions","organizations_url":"https://api.github.com/users/eduardoboucas/orgs","repos_url":"https://api.github.com/users/eduardoboucas/repos","events_url":"https://api.github.com/users/eduardoboucas/events{/privacy}","received_events_url":"https://api.github.com/users/eduardoboucas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-21T16:05:28Z","updated_at":"2018-06-23T01:51:39Z","closed_at":"2018-06-23T01:48:44Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/dadi/cache/pulls/28","html_url":"https://github.com/dadi/cache/pull/28","diff_url":"https://github.com/dadi/cache/pull/28.diff","patch_url":"https://github.com/dadi/cache/pull/28.patch"},"body":"This PR makes the file handler take full advantage of the LokiJS in-memory database, creating an entry for each cached item and reducing 1 disk I/O operation per request. When a request comes in, the key is first checked against the database and if:\r\n\r\n- There is a match, a `path` property is obtained from the database record and the file at that location is read and returned as a stream\r\n- There is no match, a cache miss is returned straight away without even going to disk\r\n\r\n(cc @mingard @adamkdean)"},"comment":{"url":"https://api.github.com/repos/dadi/cache/issues/comments/399621960","html_url":"https://github.com/dadi/cache/pull/28#issuecomment-399621960","issue_url":"https://api.github.com/repos/dadi/cache/issues/28","id":399621960,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTYyMTk2MA==","user":{"login":"jimlambie","id":116263,"node_id":"MDQ6VXNlcjExNjI2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/116263?v=4","gravatar_id":"","url":"https://api.github.com/users/jimlambie","html_url":"https://github.com/jimlambie","followers_url":"https://api.github.com/users/jimlambie/followers","following_url":"https://api.github.com/users/jimlambie/following{/other_user}","gists_url":"https://api.github.com/users/jimlambie/gists{/gist_id}","starred_url":"https://api.github.com/users/jimlambie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimlambie/subscriptions","organizations_url":"https://api.github.com/users/jimlambie/orgs","repos_url":"https://api.github.com/users/jimlambie/repos","events_url":"https://api.github.com/users/jimlambie/events{/privacy}","received_events_url":"https://api.github.com/users/jimlambie/received_events","type":"User","site_admin":false},"created_at":"2018-06-23T01:51:39Z","updated_at":"2018-06-23T01:51:39Z","author_association":"MEMBER","body":":tada: This PR is included in version 3.0.0 :tada:\n\nThe release is available on:\n- [npm package (@latest dist-tag)](https://www.npmjs.com/package/@dadi/cache)\n- [GitHub release](https://github.com/dadi/cache/releases/tag/v3.0.0)\n\nYour **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package::rocket:"}}
{"actor":{"display_login":"jimlambie"}}