{"id":15646505,"url":"https://github.com/martinheidegger/async-cache","last_synced_at":"2025-03-29T23:17:25.936Z","repository":{"id":224646520,"uuid":"763833533","full_name":"martinheidegger/async-cache","owner":"martinheidegger","description":"Simple, fast, no-dependency cache for async calls.","archived":false,"fork":false,"pushed_at":"2024-02-29T07:46:33.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T00:42:00.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/martinheidegger.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}},"created_at":"2024-02-27T02:00:53.000Z","updated_at":"2024-09-02T05:38:09.000Z","dependencies_parsed_at":"2024-02-27T03:23:14.635Z","dependency_job_id":"2418d8d5-ac3d-4980-b628-3b7c7b7b9255","html_url":"https://github.com/martinheidegger/async-cache","commit_stats":null,"previous_names":["martinheidegger/async-cache"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fasync-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fasync-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fasync-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinheidegger%2Fasync-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinheidegger","download_url":"https://codeload.github.com/martinheidegger/async-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254149,"owners_count":20747949,"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-10-03T12:13:06.084Z","updated_at":"2025-03-29T23:17:25.902Z","avatar_url":"https://github.com/martinheidegger.png","language":"JavaScript","readme":"Simple, fast, no-dependency cache for async calls.\n\n```js\nimport { createCache } from '@leichtgewicht/async-cache'\nconst cache = createCache({\n  resolver: async (key) =\u003e {\n    // load data or do something else to get the value for the key\n    return value\n  },\n  maxSize: 1000, // max amount of keys cached at the same time\n  maxAgeMs: 1000 // (optional) maxAge for a result before refetching\n})\n\nconst result = await cache.get('key') // load the key, if present in cache and not expired, will return previous value\nresult // result as provided by the async resolver\n```\n\nNote: Based on, but not depending on, [HashLRU](https://github.com/dominictarr/hashlru/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinheidegger%2Fasync-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinheidegger%2Fasync-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinheidegger%2Fasync-cache/lists"}