{"id":13619918,"url":"https://github.com/tinyhttp/lru-send","last_synced_at":"2025-04-09T15:32:02.564Z","repository":{"id":62354807,"uuid":"381367910","full_name":"tinyhttp/lru-send","owner":"tinyhttp","description":"⏩ LRU-based caching middleware for Node.js","archived":false,"fork":false,"pushed_at":"2024-09-27T09:17:06.000Z","size":444,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T08:47:05.743Z","etag":null,"topics":["caching","http","lru","memo","memoization","nodejs","performance","tinyhttp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinyhttp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"ko_fi":"v1rtl","liberapay":"v1rtl","custom":["https://paypal.me/v1rtl","https://qiwi.com/n/V1RTL","https://yoomoney.ru/to/410014774355272"],"issuehunt":"talentlessguy"}},"created_at":"2021-06-29T13:05:57.000Z","updated_at":"2024-05-27T06:03:13.000Z","dependencies_parsed_at":"2022-10-31T10:48:10.799Z","dependency_job_id":"15111d7d-2d7b-4534-89fe-475a9a3ea670","html_url":"https://github.com/tinyhttp/lru-send","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Flru-send","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Flru-send/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Flru-send/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyhttp%2Flru-send/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinyhttp","download_url":"https://codeload.github.com/tinyhttp/lru-send/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247809963,"owners_count":20999816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caching","http","lru","memo","memoization","nodejs","performance","tinyhttp"],"created_at":"2024-08-01T21:00:50.161Z","updated_at":"2025-04-09T15:32:02.268Z","avatar_url":"https://github.com/tinyhttp.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# lru-send\n\n[![npm][npm-img]][npm-url] [![GitHub Workflow Status][actions-badge]][github-actions] [![Coverage][cov-img]][cov-url]\n\n\u003c/div\u003e\n\nLRU-based caching middleware for Node.js that patches `res.send`.\n\n## Features\n\n- 😲 [**~336x faster**](bench) for heavy operations\n- ⚡ ESM-only\n- ✨ types out of the box\n- 🟥 (optionally) supports [Redis](http://redis.io/)\n\n## Install\n\n```sh\npnpm i lru-send\n```\n\n## Examples\n\n### In-memory\n\n```ts\nimport { lruSend } from 'lru-send'\nimport { App } from '@tinyhttp/app'\n\nconst app = new App()\n\napp.use(lruSend())\n\napp.use('/', (_req, res) =\u003e {\n  someUltraHeavyOp()\n  res.send('hello')\n})\n\napp.listen(3000)\n```\n\n### Redis\n\n```ts\nimport { lruSend } from 'lru-send/redis'\nimport { App } from '@tinyhttp/app'\nimport Redis from 'ioredis'\n\nconst redis = new Redis()\n\nconst app = new App()\n\napp.use(lruSend(redis))\n\napp.use('/', (_req, res) =\u003e {\n  someUltraHeavyOp()\n  res.send('hello')\n})\n\napp.listen(3000)\n```\n\n[npm-url]: https://npmjs.com/package/lru-send\n[github-actions]: https://github.com/tinyhttp/lru-send/actions\n[cov-img]: https://img.shields.io/coveralls/github/tinyhttp/lru-send?style=for-the-badge\u0026color=9F5E8C\n[cov-url]: https://coveralls.io/github/tinyhttp/lru-send\n[npm-img]: https://img.shields.io/npm/dt/lru-send?style=for-the-badge\u0026color=9F5E8C\n[actions-badge]: https://img.shields.io/github/actions/workflow/status/tinyhttp/lru-send/ci.yml?branch=master\u0026style=for-the-badge\u0026logo=github\u0026label=\u0026color=9F5E8C\n","funding_links":["https://ko-fi.com/v1rtl","https://liberapay.com/v1rtl","https://paypal.me/v1rtl","https://qiwi.com/n/V1RTL","https://yoomoney.ru/to/410014774355272","https://issuehunt.io/r/talentlessguy"],"categories":["Packages","L"],"sub_categories":["Middleware"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyhttp%2Flru-send","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinyhttp%2Flru-send","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinyhttp%2Flru-send/lists"}