{"id":15686895,"url":"https://github.com/lambdalisue/deno-ttl-cache","last_synced_at":"2025-09-05T13:43:04.718Z","repository":{"id":176683284,"uuid":"659248810","full_name":"lambdalisue/deno-ttl-cache","owner":"lambdalisue","description":"🦕 Simple TTL cache library for TypeScript","archived":false,"fork":false,"pushed_at":"2024-04-06T09:44:08.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-07T13:40:50.449Z","etag":null,"topics":["cache","deno","jsr","ttl"],"latest_commit_sha":null,"homepage":"https://jsr.io/@lambdalisue/ttl-cache","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/lambdalisue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":"lambdalisue"}},"created_at":"2023-06-27T12:37:26.000Z","updated_at":"2024-04-06T10:45:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c09d0ff-34f7-4123-bc74-56b72d8732b6","html_url":"https://github.com/lambdalisue/deno-ttl-cache","commit_stats":null,"previous_names":["lambdalisue/deno-ttl-cache"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-ttl-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-ttl-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-ttl-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-ttl-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdalisue","download_url":"https://codeload.github.com/lambdalisue/deno-ttl-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246311374,"owners_count":20757125,"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":["cache","deno","jsr","ttl"],"created_at":"2024-10-03T17:41:45.006Z","updated_at":"2025-03-30T11:27:35.420Z","avatar_url":"https://github.com/lambdalisue.png","language":"TypeScript","funding_links":["https://github.com/sponsors/lambdalisue"],"categories":[],"sub_categories":[],"readme":"# ttl-cache\n\n[![jsr](https://img.shields.io/jsr/v/%40lambdalisue/ttl-cache?logo=javascript\u0026logoColor=white)](https://jsr.io/@lambdalisue/ttl-cache)\n[![denoland](https://img.shields.io/github/v/release/lambdalisue/deno-ttl-cache?logo=deno\u0026label=denoland)](https://github.com/lambdalisue/deno-ttl-cache/releases)\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/ttl_cache/mod.ts)\n[![Test](https://github.com/lambdalisue/deno-ttl-cache/workflows/Test/badge.svg)](https://github.com/lambdalisue/deno-ttl-cache/actions?query=workflow%3ATest)\n\nSimple TTL cache library for [deno].\n\n[deno]: https://deno.land/\n\n## Usage\n\n```ts\nimport { Cache } from \"https://deno.land/x/ttl_cache@$MODULE_VERSION/mod.ts\";\n\n// Create a cache instance that has 1000 ms TTL (default)\nconst cache = new Cache\u003cstring, string\u003e(1000);\n\n// Set\n// key1 will be removed after 1000 ms\n// key2 will be removed after 5000 ms\ncache\n  .set(\"key1\", \"value\")\n  .set(\"key2\", \"value\", { ttl: 5000 });\n\n// Size\ncache.size(); // =\u003e 2\n\n// Get\ncache.get(\"key1\"); // =\u003e \"value\"\n\n// Has\ncache.has(\"key1\"); // =\u003e true\n\n// Delete\ncache.delete(\"key1\"); // =\u003e true\n\n// Clear\ncache.clear();\n```\n\n## License\n\nThe code follows MIT license written in [LICENSE](./LICENSE). Contributors need\nto agree that any modifications sent in this repository follow the license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Fdeno-ttl-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdalisue%2Fdeno-ttl-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Fdeno-ttl-cache/lists"}