{"id":15984761,"url":"https://github.com/jaredreisinger/cache-service-file-system","last_synced_at":"2026-05-06T22:06:14.906Z","repository":{"id":146778874,"uuid":"80332619","full_name":"JaredReisinger/cache-service-file-system","owner":"JaredReisinger","description":"A plugin for cache-service that uses the local file system","archived":false,"fork":false,"pushed_at":"2018-03-05T20:11:01.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T20:47:07.330Z","etag":null,"topics":["cache-service","node","npm","superagent"],"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/JaredReisinger.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":"2017-01-29T06:37:40.000Z","updated_at":"2017-01-29T09:17:42.000Z","dependencies_parsed_at":"2023-04-26T09:47:32.693Z","dependency_job_id":null,"html_url":"https://github.com/JaredReisinger/cache-service-file-system","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"ef7f2cf310ed8a2ca47fb3f0c20d90fe0394092d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JaredReisinger/cache-service-file-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fcache-service-file-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fcache-service-file-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fcache-service-file-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fcache-service-file-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaredReisinger","download_url":"https://codeload.github.com/JaredReisinger/cache-service-file-system/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredReisinger%2Fcache-service-file-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32713858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T19:35:05.142Z","status":"ssl_error","status_checked_at":"2026-05-06T19:35:03.996Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-service","node","npm","superagent"],"created_at":"2024-10-08T02:10:24.089Z","updated_at":"2026-05-06T22:06:14.876Z","avatar_url":"https://github.com/JaredReisinger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cache-service-file-system\n\nA cache-service module that provides caching via the local file system.\n\nCurrently compatible with cache-service 1.3.\n\n# Basic Usage\n\nRequire and instantiate:\n\n```javascript\nconst FsCache = require('cache-service-file-system');\n\nvar fsCache = new FsCache({\n    cacheRoot: './cache'    // evaluated relative to working directory\n});\n```\n\nCache!\n\n```javascript\nfsCache.set('key', 'value');\n```\n\n# Configuration Options\n\n`cache-service-file-system`'s constructor takes an optional config object with\nany number of the following properties:\n\n## cacheRoot\n\nA path to the root file-system directory to use for cached data.\n\n* type: string\n* default: './cache' (relative to working directory)\n\n## pathify\n\nA function to customize mapping the key to a relative cache path.  The default\nimplementation takes a key like \"abc123def\" and returns the path\n\"ab/c1/23/de/abc123def.json\", which works reasonably well for relatively short\nkeys.  You can provide a `pathify` implementation for cases where you can't\ncontrol the key directly, but need to ensure valid and short cache paths.  For\nexample,\n[superagent-cache-plugin](https://github.com/jpodwys/superagent-cache-plugin)\nsimply `JSON.stringify()`'s several values as a key.  For a more compact/dense\ncache, you can return a hash of this value.\n\n* type: function\n* default: (creates a subdirectory for every two characters in the key)\n\n\n## readOnly\n\nWhether the cache is read-only or not.\n\n* type: boolean\n* default: false\n\n## verbose\n\n\u003e When used with `cache-service`, this property is overridden by `cache-service`'s `verbose` value.\n\nWhen false, `cache-service-file-system` will log only errors. When true,\n`cache-service-file-system` will log all activity (useful for testing and\ndebugging).\n\n* type: boolean\n* default: false\n\n## type\n\nA name used for diagnostics/logs, to disambiguate between multiple instances.\n\n* type: string\n* default: 'file-system'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredreisinger%2Fcache-service-file-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredreisinger%2Fcache-service-file-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredreisinger%2Fcache-service-file-system/lists"}