{"id":24286004,"url":"https://github.com/extra-memoize/memory-cache","last_synced_at":"2025-09-10T00:39:05.083Z","repository":{"id":40502016,"uuid":"479307472","full_name":"extra-memoize/memory-cache","owner":"extra-memoize","description":"🌿","archived":false,"fork":false,"pushed_at":"2025-07-04T06:59:26.000Z","size":1185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T07:44:10.908Z","etag":null,"topics":["browser","esm","library","nodejs","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@extra-memoize/memory-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/extra-memoize.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2022-04-08T08:27:24.000Z","updated_at":"2025-07-04T08:20:46.000Z","dependencies_parsed_at":"2025-07-24T10:23:50.187Z","dependency_job_id":"9270fb19-9171-4cf3-ba17-a0556ed407fb","html_url":"https://github.com/extra-memoize/memory-cache","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/extra-memoize/memory-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extra-memoize%2Fmemory-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extra-memoize%2Fmemory-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extra-memoize%2Fmemory-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extra-memoize%2Fmemory-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/extra-memoize","download_url":"https://codeload.github.com/extra-memoize/memory-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extra-memoize%2Fmemory-cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274390541,"owners_count":25276406,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["browser","esm","library","nodejs","npm-package","typescript"],"created_at":"2025-01-16T07:19:44.192Z","updated_at":"2025-09-10T00:39:05.055Z","avatar_url":"https://github.com/extra-memoize.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @extra-memoize/memory-cache\n## Install\n```sh\nnpm install --save @extra-memoize/memory-cache\n# or\nyarn add @extra-memoize/memory-cache\n```\n\n## API\n### Cache\n```ts\nclass Cache\u003cT\u003e implements ICache\u003cT\u003e {\n  clear(): void\n}\n```\n\n### LRUCache\n```ts\nclass LRUCache\u003cT\u003e implements ICache\u003cT\u003e {\n  constructor(limit: number)\n\n  delete(key: string): void\n  clear(): void\n}\n```\n\nThe classic LRU cache.\n\n### ExpirableCache\n```ts\nclass ExpirableCache\u003cT\u003e implements ICache\u003cT\u003e {\n  constructor(timeToLive: number /*ms*/)\n\n  clear(): void\n}\n```\n\nThe classisc expirable cache.\n\n#### ExpirableCacheWithStaleWhileRevalidate\n```ts\nclass ExpirableCacheWithStaleWhileRevalidate\u003cT\u003e implements IStaleWhileRevalidateCache\u003cT\u003e {\n  constructor(timeToLive: number /*ms*/, staleWhileRevalidate: number /*ms*/)\n}\n```\n\n#### ExpirableCacheWithStaleIfError\n```ts\nclass ExpirableCacheWithStaleIfError\u003cT\u003e implements IStaleIfErrorCache\u003cT\u003e {\n  constructor(timeToLive: number /*ms*/, staleIfError: number /*ms*/)\n}\n```\n\n#### ExpirableCacheWithStaleWhileRevalidateAndStaleIfError\n```ts\nclass ExpirableCacheWithStaleWhileRevalidateAndStaleIfError\u003cT\u003e implements IStaleWhileRevalidateAndStaleIfErrorCache\u003cT\u003e {\n  constructor(\n    timeToLive: number /*ms*/\n  , staleWhileRevalidate: number /*ms*/\n  , staleIfError: number /*ms*/\n  )\n}\n```\n\n### TLRUCache\n```ts\nclass TLRUCache\u003cT\u003e implements ICache\u003cT\u003e {\n  constructor(limit: number, timeToLive: number /*ms*/)\n\n  clear(): void\n}\n```\n\nThe classic TLRU cache.\n\n#### TLRUCacheWithStaleWhileRevalidate\n```ts\nclass TLRUCacheWithStaleWhileRevalidate\u003cT\u003e implements IStaleWhileRevalidateCache\u003cT\u003e {\n  constructor(limit: number, timeToLive: number /*ms*/, staleWhileRevalidate: number /*ms*/)\n}\n```\n\n#### TLRUCacheWithStaleIfError\n```ts\nclass TLRUCacheWithStaleIfError\u003cT\u003e implements IStaleIfErrorCache\u003cT\u003e {\n  constructor(limit: number, timeToLive: number /*ms*/, staleIfError: number /*ms*/)\n}\n```\n\n#### TLRUCacheWithStaleWhileRevalidateAndStaleIfError\n```ts\nclass TLRUCacheWithStaleWhileRevalidateAndStaleIfError\u003cT\u003e implements IStaleWhileRevalidateAndStaleIfErrorCache\u003cT\u003e {\n  constructor(\n    limit: number\n  , timeToLive: number /*ms*/\n  , staleWhileRevalidate: number /*ms*/\n  , staleIfError: number /*ms*/\n  )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextra-memoize%2Fmemory-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextra-memoize%2Fmemory-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextra-memoize%2Fmemory-cache/lists"}