{"id":30043206,"url":"https://github.com/0k/cache","last_synced_at":"2025-08-07T04:57:02.090Z","repository":{"id":307980031,"uuid":"1031293213","full_name":"0k/cache","owner":"0k","description":"Kids cache typescript implementation","archived":false,"fork":false,"pushed_at":"2025-08-03T12:44:18.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-03T12:51:35.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0k.png","metadata":{"files":{"readme":"README.org","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,"zenodo":null}},"created_at":"2025-08-03T12:42:47.000Z","updated_at":"2025-08-03T12:44:21.000Z","dependencies_parsed_at":"2025-08-03T12:51:39.019Z","dependency_job_id":"c770fe82-526f-4afe-a1fd-e06b23547eec","html_url":"https://github.com/0k/cache","commit_stats":null,"previous_names":["0k/cache"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/0k/cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0k%2Fcache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0k%2Fcache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0k%2Fcache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0k%2Fcache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0k","download_url":"https://codeload.github.com/0k/cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0k%2Fcache/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269201300,"owners_count":24377460,"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-08-07T02:00:09.698Z","response_time":73,"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":[],"created_at":"2025-08-07T04:56:59.034Z","updated_at":"2025-08-07T04:57:02.077Z","avatar_url":"https://github.com/0k.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# -*- ispell-local-dictionary: \"english\" -*-\n\n#+TITLE: Typescript cache decorator\n\nThis packages holds a cache decorator implementation. It draws its\ninspiration on [[https://pypi.python.org/pypi/kids.cache/][kids.cache]] a python simple yet powerful cache\ndecorator.\n\n\nThis implementation leverage decorator in typescript to reach same goals:\n\n- no dependencies\n- cache clearing support\n\n\nIts still in infancy and lacks:\n\n- support for normal function (only methods are cachable)\n- cache stats\n- 100% coverage\n- doc\n\nHowever, straying from [[https://pypi.python.org/pypi/kids.cache/][kids.cache]]:\n\n- it leverages =Proxy= javascript niceties to provide a default\n  caching mechanism that records exactly what the function to be\n  cached used in the input arguments. This allows to have precise and\n  minimal footprints when looking for cache hits.\n\n- as a consequence this part of the code is a little more ambitious\n  (bigger) than its counterpart.\n\n\n* Adding =@0k/cache= to your project\n\nFrom the root of your project:\n\n#+begin_src sh\nnpm install --save @0k/cache\n#+end_src\n\nOr better, as =@0k/cache= is still in early release,\n\n#+begin_src sh\nnpm install --save @0k/cache#master\n#+end_src\n\nTo be sure to get the latest version, relaunch this last command\nwhenever you want to update.\n\n* Contributing to =@0k/cache=\n\nThis package is using ~npm~ to track dependendies, so you can install them\nwith:\n\n   #+begin_src sh\n   npm install\n   #+end_src\n\nAs this package is written in =typescript=. You can transpile to\n=javascript= and transpile on file change with:\n\n   #+begin_src sh\n   ## Compile and watch\n   npx tspc -w\n   #+end_src\n\nTests are managed through =vitest=\n\n\n   #+begin_src sh\n   ## Run test once\n   npm run test\n   #+end_src\n\nNote that you can also use ~npx vitest~ command to launch tests in\nwatch mode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0k%2Fcache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0k%2Fcache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0k%2Fcache/lists"}