{"id":16832658,"url":"https://github.com/zswang/jfetchs","last_synced_at":"2025-08-26T07:07:34.487Z","repository":{"id":57280620,"uuid":"138988351","full_name":"zswang/jfetchs","owner":"zswang","description":"cache of fetch data","archived":false,"fork":false,"pushed_at":"2018-10-13T08:41:38.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T07:21:17.526Z","etag":null,"topics":["cache","fetch"],"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/zswang.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}},"created_at":"2018-06-28T08:19:58.000Z","updated_at":"2019-07-21T14:49:44.000Z","dependencies_parsed_at":"2022-09-02T21:41:34.158Z","dependency_job_id":null,"html_url":"https://github.com/zswang/jfetchs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zswang/jfetchs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjfetchs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjfetchs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjfetchs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjfetchs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zswang","download_url":"https://codeload.github.com/zswang/jfetchs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fjfetchs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272186715,"owners_count":24888435,"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-26T02:00:07.904Z","response_time":60,"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":["cache","fetch"],"created_at":"2024-10-13T11:49:57.449Z","updated_at":"2025-08-26T07:07:34.463Z","avatar_url":"https://github.com/zswang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## jfetchs\n\n# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url]\n\n封装获取缓存的方法 Cache of fetch data\n\n## 使用方法 Usage\n\n### 声明缓存 Declaration cache\n\n```js\nvar cache = new jfetchs.Cache({\n  debug: 'localhost',\n  expire: 60, // 60 seconds\n  fetch: () =\u003e {\n    return Promise.resolve(Date.now())\n  },\n})\n\ncache.fetch().then(data =\u003e {\n  console.log(data)\n})\n```\n\n## API\n\n### Cache.fetch\n\n```js\n/**\n * 获取数据 Fetch cached data\n * @param key 缓存标志，默认: ''\n */\nCache.fetch(key?: string) {}\n```\n\n### Cache.flush\n\n```js\n/**\n * 移除缓存 Remove cached data\n * @param key 缓存标志，默认: ''\n */\nCache.flush(key?: string) {}\n```\n\n## License\n\nMIT © [zswang](http://weibo.com/zswang)\n\n[npm-url]: https://npmjs.org/package/jfetchs\n[npm-image]: https://badge.fury.io/js/jfetchs.svg\n[travis-url]: https://travis-ci.org/zswang/jfetchs\n[travis-image]: https://travis-ci.org/zswang/jfetchs.svg?branch=master\n[coverage-url]: https://coveralls.io/github/zswang/jfetchs?branch=master\n[coverage-image]: https://coveralls.io/repos/zswang/jfetchs/badge.svg?branch=master\u0026service=github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzswang%2Fjfetchs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzswang%2Fjfetchs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzswang%2Fjfetchs/lists"}