{"_id":"@byungi/lru-cache","_rev":"4-c9a932e0eba7ce854b5529b8052d4d01","name":"@byungi/lru-cache","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@byungi/lru-cache","description":"Typed fast LRU cache for browser.","version":"0.0.1","author":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"repository":{"type":"git","url":"https://github.com/skt-t1-byungi/lru-cache.git"},"main":"index.js","types":"index.d.ts","license":"MIT","scripts":{"test":"npm run clean && ava","clean":"rm -f *.js *.d.ts","build":"tsc","prepublishOnly":"npm run build"},"devDependencies":{"@byungi/p-delay":"^0.1.3","ava":"^2.4.0","eslint":"^6.6.0","eslint-config-byungi":"^0.7.6","ts-node":"^8.4.1","typescript":"^3.6.4"},"eslintConfig":{"extends":"byungi/typescript"},"eslintIgnore":["index.js","index.d.ts"],"publishConfig":{"access":"public"},"ava":{"compileEnhancements":false,"extensions":["ts"],"require":["ts-node/register"]},"licenseText":"MIT License\n-----------\n\nCopyright (c) 2019 skt-t1-byungi\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","_id":"@byungi/lru-cache@0.0.1","dist":{"shasum":"d1960407ba7236289447a66723cf67a093fe7af3","integrity":"sha512-3fQhRQElfR7w00aSG4vVnpahsWwwS9rzTlV8TZH3E8SZWBe/WWrSjYmknh3KLw6DIbSQrsTaKY7Qq9R+3AwU0g==","tarball":"https://registry.npmjs.org/@byungi/lru-cache/-/lru-cache-0.0.1.tgz","fileCount":6,"unpackedSize":7144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtq8DCRA9TVsSAnZWagAAqvkP/0UrKBPESf1yXFzo8hZI\nhlfA2OJTY338DVWsBFy3i0/Kx+HW6YuD8KIxjpWYeB6ZToFCeuwIW2Jjeffd\n5lfvGLOn5wbf99RoYuEQLJldrNbSGxFUKkJKVMzF6b/Zp77ib3UpW1/FgN7o\n4dbsI1NGUp9AOAxR/VwsxNugSqbb/hj7H/N5Yo/NVpQqooG2F7wJDOYjKJJQ\nPZwdfl+zpOy0BCANa3Vu0FG0ev/tIkr/DT/Ha0R+pJgPVW5x2t92JSP7RZSt\n3UPYcO2jfw1Sl4oaBn2VnjW5/VU3KHc0LkLvMT32w/ocYWdeHRbtAimqNcME\n2aVUJDynbsta80Ip+x5rA361XJtv+tZ6AeUy5260JahWag+WvmKOxAYO2fzI\n8F+Hm5GeLd4Z7q2fTwd82R63nxWj/X1iAFJC+9waS20UBTmyhZH2I5s+Pakd\nKdqviubIPcQEKciwOWYT0JJw7RlD3AitVlRGWhimrxjf8Mvh8XCT7X/sSKGm\n6bU0MIwY0g+HQVGl3Ay743uIpf3d/jjAsxGXseeH3tLfdsp8R6RSPYtUWuj9\nrlcSADQQ9faAHVTlB8HcMn8tiR36LzhzmJoLlvg8V0KJwEF1dnGGfqqSiymg\nKGuowVMNSxeUKWxJryZRqUT1RKddbTg5lx6mWUOUsDWQQymtuo6viOz0q8/z\noU1V\r\n=UVD7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuEESbvD4e8JcoS1gaED5RQ1yQAFUqZmyZdgpr7xstVAiEA45EQsAmmDm7zVU99lV2uw/eaCvrDcZEVgOuNviItObw="}]},"maintainers":[{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"}],"_npmUser":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lru-cache_0.0.1_1572253443611_0.7841578774723608"},"_hasShrinkwrap":false},"0.0.2":{"name":"@byungi/lru-cache","description":"Typed fast LRU cache for browser.","version":"0.0.2","author":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"repository":{"type":"git","url":"https://github.com/skt-t1-byungi/lru-cache.git"},"main":"index.js","types":"index.d.ts","license":"MIT","keywords":["lru","cache","ttl","time to live"],"scripts":{"test":"npm run clean && ava","clean":"rm -f *.js *.d.ts","build":"tsc","prepublishOnly":"npm run build"},"devDependencies":{"@byungi/p-delay":"^0.1.3","ava":"^2.4.0","eslint":"^6.6.0","eslint-config-byungi":"^0.7.6","ts-node":"^8.4.1","typescript":"^3.6.4"},"eslintConfig":{"extends":"byungi/typescript"},"eslintIgnore":["index.js","index.d.ts"],"publishConfig":{"access":"public"},"ava":{"compileEnhancements":false,"extensions":["ts"],"require":["ts-node/register"]},"licenseText":"MIT License\n-----------\n\nCopyright (c) 2019 skt-t1-byungi\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","_id":"@byungi/lru-cache@0.0.2","dist":{"shasum":"367cb98bea73a40084591b8ed4bc10bb3b87c370","integrity":"sha512-rm1mYIqrMqrEqMvCml4q/QyUWcyvEfhTZrbRh4Dwzh3gERdR6c2kOI1VVNqQrmAZRLt0YU+63o2jn3dIlv0aGg==","tarball":"https://registry.npmjs.org/@byungi/lru-cache/-/lru-cache-0.0.2.tgz","fileCount":6,"unpackedSize":7229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtq/ICRA9TVsSAnZWagAABdgP/2je6MH4Z0/RqYtpEAgS\nd0gabOj+kg7I7pvZoiFUdQQZYEUHE21qBy6LHMp97Wx78Whuzc9d7w7hWOEl\nEIQkx6oQ6C72pboeHLBPDvuSwp4hm53DN4XmLz6wtDlQ6YZtgFv3WrgO2nrh\nvjbKm7YMGuaQPesAFbteMW0DDb9GzPsUmUdIyVjYRl3OE8VK3fpZ7EgwCcEu\n0xRmpR0R02GoVuwg+ohWgxdYULqCC/brfd5M5VviaBg16Tr8XC3i9pfhbEYk\nNmmhJLypN+mJeR1B9+oj+9+smtxAFzj+6oyDvy/vZaxcZZhbPtI5iZNBYnM3\n5gvW9odPzHU5kkYnEJK36gHG3YG3M4n5tv41Hyo0RTHohOAugt9zhrnOJzgp\njU+cd1en/2I6Gvb8HLF7jtELsbcA+l73Nv6YT5YxJqYMUXpudNxeQMAZePkB\nd05l7xE7eSWcVCmOXfcf+cwLgk9AtkJl/69Uy/3DxSxCtPMNfGXygl1BtmOr\nagg5RaJX6IAM2svFjkRujaSCLbhXXNHsuJ9qKYU1uAXIKWBqUZoj8MG1OB0L\nK4ZXUWpTj2RJl9XcGdVOI01T3ok6Ylw9GSLdAhuHo6SXUwn9/bg3K8CxfoA+\ng9zY/IXVGZm9EuJ0+Z/YDukVgPGsRlpKy+e78gvOxjHxOsJBevsGKaqnPT2i\n29ef\r\n=ZGp2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDhD5cJW+0FL1ZkgQLgX0x4eZaKYycyTGQUQSHgdTLnqAiA3p0wwqWSHDzGApOHaNoqzswoYiSzwXi8CeYNYHmQEZQ=="}]},"maintainers":[{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"}],"_npmUser":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lru-cache_0.0.2_1572253640593_0.3344371989793422"},"_hasShrinkwrap":false},"0.1.0":{"name":"@byungi/lru-cache","description":"Typed fast LRU cache for browser.","version":"0.1.0","author":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"repository":{"type":"git","url":"https://github.com/skt-t1-byungi/lru-cache.git"},"main":"index.js","types":"index.d.ts","license":"MIT","keywords":["lru","cache","ttl","time to live"],"scripts":{"test":"npm run clean && ava","clean":"rm -f *.js *.d.ts","build":"tsc","prepublishOnly":"npm run build"},"devDependencies":{"@byungi/p-delay":"^0.1.3","ava":"^2.4.0","eslint":"^6.6.0","eslint-config-byungi":"^0.7.6","ts-node":"^8.4.1","typescript":"^3.6.4"},"eslintConfig":{"extends":"byungi/typescript"},"eslintIgnore":["index.js","index.d.ts"],"publishConfig":{"access":"public"},"ava":{"compileEnhancements":false,"extensions":["ts"],"require":["ts-node/register"]},"licenseText":"MIT License\n-----------\n\nCopyright (c) 2019 skt-t1-byungi\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","_id":"@byungi/lru-cache@0.1.0","dist":{"shasum":"1ab7c945d06f97770147009fdeb86ab9a31865b1","integrity":"sha512-n/Oh3+NOcLp1psEBr7ellhNOlaGHPxGZwGeiiwIwSZWJrJG+y0gtsjProOAugMaLddL0ke9eeht9rNhrvIrWNQ==","tarball":"https://registry.npmjs.org/@byungi/lru-cache/-/lru-cache-0.1.0.tgz","fileCount":6,"unpackedSize":7356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdusyQCRA9TVsSAnZWagAAbA8P+QBYWwOD8lhyRXCdIjfm\ncIbqgRHUk8b8ce/jgI35hRXX2u6OksfvpBXe8B3jDMDQ8Id7bYqw2pMQmt8S\n5bnin+E4YT+5lgWn8YbRUegGl3QdprjRvuncgvKomiaGdfVhxI3AwpW8+MeB\nzesjFZJOZ+lZLcXoUGWjAhN+R5Tbt4ALU38TWuwn3P+cw497HiNDa8jdPBCu\nl5W9jtocmVN3LzlOiMbSmD/qRvJRXvm8RACkkcWwZKT6tEva6IcNL2mQVkNB\no4NzF23Uze1NcFnbSF9yB+xNn9C5GVPh5vUyeKJB+F+AfeBVwdd45DcegQbO\nHLva6mr0C2RjisRAL+Tp58RItIJHeAov696iUmrQgVZ2mz8kKYBhIKsaUWm3\nDQTAcX8XTkY6V4OZ+Sa7EJVb9jOv0axGOVyc04u+fbz1ItIhm0alMryjpfLB\nz8JS7csQz/kiF/1wlo72NCaEzLB5PxGS95ixLmLJS/USxY9IrI831ZQs8Li6\nJJcXNrVBxjutD3Z5ed9I2gB3E6FhlhWUVvvAEtEE7HeuAgpuvjbB8tWvy6mK\nKoycKEbeD3Nlz4+dHL/wX7B3vcXaIIBjsA2DTA2+hVyHCXeS0c0xXP//S61G\nOBqVZSrhJpKGXZ4mh5H1dFVws8VLREiRFT/KU7wTnA9qb+cjQsB+gR+m+to6\n7FGX\r\n=DATr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIElIj49VpTMSVxkySfMD0cKV1wmcgz0z1KpLV5HsKxR+AiEA8OR+64vd1Aek/h0PvP2v8PaaSonfn6GsCJO7nQyd1to="}]},"maintainers":[{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"}],"_npmUser":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lru-cache_0.1.0_1572523152243_0.576280346496935"},"_hasShrinkwrap":false},"0.1.1":{"name":"@byungi/lru-cache","description":"Typed fast LRU cache for browser.","version":"0.1.1","author":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"repository":{"type":"git","url":"https://github.com/skt-t1-byungi/lru-cache.git"},"main":"index.js","types":"index.d.ts","license":"MIT","keywords":["lru","cache","ttl","time to live"],"scripts":{"test":"npm run clean && ava","clean":"rm -f *.js *.d.ts","build":"tsc","prepublishOnly":"npm run build"},"devDependencies":{"@byungi/p-delay":"^0.1.3","ava":"^2.4.0","eslint":"^6.6.0","eslint-config-byungi":"^0.7.6","ts-node":"^8.4.1","typescript":"^3.6.4"},"eslintConfig":{"extends":"byungi/typescript"},"eslintIgnore":["index.js","index.d.ts"],"publishConfig":{"access":"public"},"ava":{"compileEnhancements":false,"extensions":["ts"],"require":["ts-node/register"]},"licenseText":"MIT License\n-----------\n\nCopyright (c) 2019 skt-t1-byungi\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","_id":"@byungi/lru-cache@0.1.1","dist":{"shasum":"ad3b52f48e5b85ad8ec90417c254eda1aa5603f6","integrity":"sha512-WNZZ9aMS9wcyaexGL6TKb6dSxpBQLr6M3gd5x2PqnkJqrdPgh57n5k+ej9j9eXE7hW9LpOAgrLv0gRT3ouMeBw==","tarball":"https://registry.npmjs.org/@byungi/lru-cache/-/lru-cache-0.1.1.tgz","fileCount":6,"unpackedSize":7356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdus0rCRA9TVsSAnZWagAAoGMQAJJnLRor3VOD1HMU2HWj\nREt+pfGGfqHRewWqKaQ5zmKjLOChA2NmjxA8GLZbCQZRZ1ZQOZagd2A7fRdX\nTGY3V0029K3Hb1l6+GYCtMF4R+h+tEsZrP6o+Zy30vYwIFpNE31WmAa/Wool\niHh1d8jPhAX1ViITqP51FFWXr8CbL0QfED/mdF3jL1NNsYlzwTfkcfQB6yEc\n1qp6ir4OFtgm2/NLS4UGgI7+38JE4CeTiFGfII1lfXiPWhonPmeaGacRKLlX\nBZ/jcTTuUxqKltXjWGjjPlZGKTw9ibuW8mui9fCXikxkp5IyDlAFOi62+agx\nH5J3Q81etEkVA0n1rirFmVjEoKKuUwLrTneRAZOYlczLgmc6Ml9O91iBBsiD\nqaex4QNlg16INnvT7Ys8hrtZj7b/QX6UCSN8zhKSm1l0qkWabkEwUphx9eV1\nYGMn8xnjebHt865Lc7tEL0aL0feTrE4uceNLoSyDTBOxa37eYVy2bMkeaSf4\nc5cHyNzkTsVrOmryS/85gEhNwhssVSL+glkeQErBs99vP4a4x3RQMixfaAHt\nPS5CxH59VOi9p8Tt6k/BRVcBbPfmlRSNmvOzH45JPzyX9m9KoQIMM1bx0bY9\nDR6Jiz8xsvyiwSsxo6QGRpeAfYXnsmFt3SZ8wRN4Im3x1I/4oMjJgX0Y/ZsW\n/jWI\r\n=gFCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDg+d4oIPjGiNmN03ta+yL97KuUE72hHN+qG1gs9NSgDAIgcis1vR9WEizmm1kzfJvrUpEJHTQwp8Za3z7zfpYzg4s="}]},"maintainers":[{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"}],"_npmUser":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lru-cache_0.1.1_1572523307217_0.7659371381147504"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-28T09:04:03.422Z","0.0.1":"2019-10-28T09:04:03.719Z","modified":"2022-04-04T21:23:15.849Z","0.0.2":"2019-10-28T09:07:20.717Z","0.1.0":"2019-10-31T11:59:12.384Z","0.1.1":"2019-10-31T12:01:47.371Z"},"maintainers":[{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"}],"description":"Typed fast LRU cache for browser.","repository":{"type":"git","url":"https://github.com/skt-t1-byungi/lru-cache.git"},"author":{"name":"skt-t1-byungi","email":"tiniwz@gmail.com"},"license":"MIT","readme":"# @byungi/lru-cache\n> Typed fast LRU cache for browser.\n\nImplemented by the fast lru algorithm of [hashlru](https://github.com/dominictarr/hashlru).\nAdded [ttl](https://en.wikipedia.org/wiki/Time_to_live) and old browser support.\n\n\n[![npm](https://flat.badgen.net/npm/v/@byungi/lru-cache)](https://www.npmjs.com/package/@byungi/lru-cache)\n[![license](https://flat.badgen.net/github/license/skt-t1-byungi/lru-cache)](https://github.com/skt-t1-byungi/lru-cache/blob/master/LICENSE)\n\n## Install\n```sh\nnpm i @byungi/lru-cache\n```\n\n## Example\n```js\nimport LRUCache from '@byungi/lru-cache'\n\nconst cache = new LRUCache({max: 2, ttl: 100})\n\ncache.set('a', 1)\nconsole.log(cache.has('a')) // => true\n\ncache.set('b', 2)\ncache.set('c', 3)\ncache.set('d', 4)\nconsole.log(cache.has('a')) // => false\n\nconsole.log(cache.has('d')) // => true\nsetTimeout(()=> {\n    // After ttl(100ms).\n    console.log(cache.has('d')) // => false\n}, 100)\n```\n\n## API\n### new LRUCache(options?)\nCreate an instance.\n\n#### options\n- `max` - Maximum cache size. (Default: `Infinity`)\n- `ttl` - Time to live. (Default: `Infinity`)\n- `renewTTL` - If `true`, renew `ttl` when getting value. (Default: `true`)\n\n### cache.set(key, value)\nSet value by key.\n\n### cache.get(key)\nGet value by key.\n\n### cache.has(key)\nReturns whether a key exists.\n\n### cache.delete(key)\nDelete value by key\n\n### cache.clear()\nDelete all values.\n\n## License\nMIT\n","readmeFilename":"README.md","keywords":["lru","cache","ttl","time to live"]}