{"id":21937636,"url":"https://github.com/cap32/tiny-cache-store","last_synced_at":"2026-05-05T06:33:54.004Z","repository":{"id":88318997,"uuid":"155702488","full_name":"Cap32/tiny-cache-store","owner":"Cap32","description":" Tiny cache store for Node.js and browser","archived":false,"fork":false,"pushed_at":"2018-11-02T09:38:53.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T14:57:29.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Cap32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"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}},"created_at":"2018-11-01T11:05:51.000Z","updated_at":"2023-03-04T05:34:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"144f0bbd-a089-4803-9d6f-edf55933eeda","html_url":"https://github.com/Cap32/tiny-cache-store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Ftiny-cache-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Ftiny-cache-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Ftiny-cache-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap32%2Ftiny-cache-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap32","download_url":"https://codeload.github.com/Cap32/tiny-cache-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244967889,"owners_count":20540029,"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":[],"created_at":"2024-11-29T01:21:01.069Z","updated_at":"2026-05-05T06:33:53.943Z","avatar_url":"https://github.com/Cap32.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tiny-cache-store\n\n[![Build Status](https://travis-ci.org/Cap32/tiny-cache-store.svg?branch=master)](https://travis-ci.org/Cap32/tiny-cache-store)\n[![Coverage Status](https://coveralls.io/repos/github/Cap32/tiny-cache-store/badge.svg?branch=master)](https://coveralls.io/github/Cap32/tiny-cache-store?branch=master)\n[![License](https://img.shields.io/badge/license-MIT_License-brightgreen.svg?style=flat)](https://github.com/Cap32/tiny-cache-store/blob/master/LICENSE.md)\n\n[WIP] Tiny cache store for Node.js and browser\n\n**NOTE: Usage may change before v1.0 released**\n\n## Features\n\n- Tiny (less than 1kb after gzip)\n- High performance\n- Support TTL and LRU\n- Support promise\n\n## Installation\n\n```bash\nnpm install tiny-cache-store\n```\n\n## Usage\n\n```js\nimport TinyCache from \"tiny-cache-store\";\n\nconst cache = new TinyCache();\ncache.set(\"foo\", \"bar\");\ncache.get(\"foo\"); // =\u003e 'bar'\ncache.size(); // =\u003e 1\ncache.has(\"foo\"); // =\u003e true\ncache.delete(\"foo\"); // =\u003e true\ncache.set(\"foo\", \"bar\", { maxAge: 60 }); // ttl 1 minute\ncache.clear();\n```\n\n#### LRU\n\n```js\nimport TinyCache from \"tiny-cache-store\";\n\nconst cache = new TinyCache({ max: 10 });\nfor (let i = 0; i \u003c 100; i++) {\n  cache.set(i, i);\n}\ncache.size(); // =\u003e 10\n```\n\n## Contributing\n\nContributions welcome! See the [Contributing Guide](/CONTRIBUTING.md)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap32%2Ftiny-cache-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap32%2Ftiny-cache-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap32%2Ftiny-cache-store/lists"}