{"id":13781356,"url":"https://github.com/thinkjs/think-cache-file","last_synced_at":"2025-06-30T12:34:33.075Z","repository":{"id":65412377,"uuid":"84652135","full_name":"thinkjs/think-cache-file","owner":"thinkjs","description":"Use file to cache data for Think 3.x","archived":false,"fork":false,"pushed_at":"2021-07-02T00:14:25.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-19T17:01:09.310Z","etag":null,"topics":["cache","think-adapter","thinkjs3"],"latest_commit_sha":null,"homepage":"","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/thinkjs.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":"2017-03-11T13:32:42.000Z","updated_at":"2021-07-02T00:14:16.000Z","dependencies_parsed_at":"2023-01-22T07:55:25.353Z","dependency_job_id":null,"html_url":"https://github.com/thinkjs/think-cache-file","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thinkjs/think-cache-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-cache-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-cache-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-cache-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-cache-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-cache-file/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-cache-file/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262774053,"owners_count":23362232,"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","think-adapter","thinkjs3"],"created_at":"2024-08-03T18:01:25.211Z","updated_at":"2025-06-30T12:34:33.023Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","readme":"# think-cache-file\n[![Build Status](https://travis-ci.org/thinkjs/think-cache-file.svg?branch=master)](https://travis-ci.org/thinkjs/think-cache-file)\n[![Coverage Status](https://coveralls.io/repos/github/thinkjs/think-cache-file/badge.svg?branch=master)](https://coveralls.io/github/thinkjs/think-cache-file?branch=master)\n[![npm](https://img.shields.io/npm/v/think-cache-file.svg?style=flat-square)](https://www.npmjs.com/package/think-cache-file)\n\nUse file to cache data\n\n## Install\n\n```\nnpm install think-cache-file\n```\n\n\n## How to Usage\n\nedit config file `src/config/adapter.js`, add options:\n\n```js\nconst fileCache = require('think-cache-file');\nexports.cache = {\n  type: 'file',\n  common: {\n    timeout: 24 * 60 * 60 * 1000, // millisecond\n  },\n  file: {\n    handle: fileCache,\n    cachePath: '/home/usr/data',  // absolute path is necessarily required\n    pathDepth: 1,\n    gcInterval: 24 * 60 * 60 * 1000 // gc\n  }\n}\n```\n","funding_links":[],"categories":["Adapters"],"sub_categories":["cache"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-cache-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-cache-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-cache-file/lists"}