{"id":22796286,"url":"https://github.com/makerxstudio/node-cache","last_synced_at":"2026-02-06T11:34:02.112Z","repository":{"id":219728847,"uuid":"739255702","full_name":"MakerXStudio/node-cache","owner":"MakerXStudio","description":"NodeJS package that makes it easy to cache objects and files locally and in AWS","archived":false,"fork":false,"pushed_at":"2024-06-21T03:55:50.000Z","size":570,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-28T21:48:12.069Z","etag":null,"topics":["aws","cache","npm","package","s3","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MakerXStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-05T06:07:17.000Z","updated_at":"2024-08-22T17:50:27.000Z","dependencies_parsed_at":"2025-07-16T11:50:09.214Z","dependency_job_id":"cc42f7e5-7a3d-411b-9eea-2e64ca5d5381","html_url":"https://github.com/MakerXStudio/node-cache","commit_stats":null,"previous_names":["makerxstudio/node-cache"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MakerXStudio/node-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fnode-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fnode-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fnode-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fnode-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MakerXStudio","download_url":"https://codeload.github.com/MakerXStudio/node-cache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fnode-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29159599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","cache","npm","package","s3","typescript"],"created_at":"2024-12-12T05:11:48.822Z","updated_at":"2026-02-06T11:34:02.034Z","avatar_url":"https://github.com/MakerXStudio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NodeJS Cache (node-cache)\n\n\u003e A NodeJS package that makes it easy to cache objects and files locally and in AWS\n\n[![Build Status][build-img]][build-url]\n[![Issues][issues-img]][issues-url]\n[![Semantic Release][semantic-release-img]][semantic-release-url]\n\n## Install\n\n```bash\nnpm install @makerx/node-cache\n```\n\n## Usage\n\nThe primary purpose of this package is to make it easy to cache objects and files.\n\n```typescript\nimport { S3 } from '@aws-sdk/client-s3'\nimport { FileSystemObjectCache, S3ObjectCache } from '@makerx/node-cache'\n\nconst cache =\n  process.env.CACHE_BUCKET_NAME === 'local'\n    ? new FileSystemObjectCache(path.join(__dirname, '../.cache'))\n    : new S3ObjectCache(\n        new S3({\n          region: process.env.AWS_REGION,\n        }),\n        process.env.CACHE_BUCKET_NAME,\n        'optional/cache/prefix',\n      )\n\nfor (let i =0; i \u003c 10; i++\u003e) {\n  const value = await cache.getAndCache('test', async (existing: {test: number} | undefined) =\u003e {\n    await new Promise(resolve =\u003e setTimeout(resolve, 100))\n    const e = existing ?? {test: 1}\n    e.test++\n    return e\n  }, {\n    staleAfterSeconds: 1\n  })\n  console.log(value)\n  await new Promise(resolve =\u003e setTimeout(resolve, 500))\n}\n\nawait cache.put('test', {test: 100})\n\n```\n\n---\n\n[build-img]: https://github.com/MakerXStudio/node-cache/actions/workflows/release.yaml/badge.svg\n[build-url]: https://github.com/MakerXStudio/node-cache/actions/workflows/release.yaml\n[issues-img]: https://img.shields.io/github/issues/MakerXStudio/node-cache\n[issues-url]: https://github.com/MakerXStudio/node-cache/issues\n[semantic-release-img]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n[semantic-release-url]: https://github.com/semantic-release/semantic-release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerxstudio%2Fnode-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerxstudio%2Fnode-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerxstudio%2Fnode-cache/lists"}