{"id":17497551,"url":"https://github.com/miguelcastillo/bit-loader-cache","last_synced_at":"2026-02-09T21:07:54.789Z","repository":{"id":74788131,"uuid":"67709993","full_name":"MiguelCastillo/bit-loader-cache","owner":"MiguelCastillo","description":"Caching plugin for bit-loader","archived":false,"fork":false,"pushed_at":"2020-03-26T22:38:42.000Z","size":73,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T04:26:40.483Z","etag":null,"topics":[],"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/MiguelCastillo.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":"2016-09-08T14:23:55.000Z","updated_at":"2020-09-09T02:25:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b1ce4d9-62d4-4b7a-bdcd-152e6ac22373","html_url":"https://github.com/MiguelCastillo/bit-loader-cache","commit_stats":{"total_commits":57,"total_committers":3,"mean_commits":19.0,"dds":0.4035087719298246,"last_synced_commit":"f1fc13838ff2f856b84b1275fbb566cdc250484d"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/MiguelCastillo/bit-loader-cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelCastillo%2Fbit-loader-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelCastillo%2Fbit-loader-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelCastillo%2Fbit-loader-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelCastillo%2Fbit-loader-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MiguelCastillo","download_url":"https://codeload.github.com/MiguelCastillo/bit-loader-cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiguelCastillo%2Fbit-loader-cache/sbom","scorecard":{"id":94016,"data":{"date":"2025-08-11","repo":{"name":"github.com/MiguelCastillo/bit-loader-cache","commit":"f1fc13838ff2f856b84b1275fbb566cdc250484d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T08:30:02.743Z","repository_id":74788131,"created_at":"2025-08-15T08:30:02.743Z","updated_at":"2025-08-15T08:30:02.743Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740720,"owners_count":24812642,"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-23T02:00:09.327Z","response_time":69,"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":"2024-10-19T15:57:29.582Z","updated_at":"2026-02-09T21:07:54.722Z","avatar_url":"https://github.com/MiguelCastillo.png","language":"JavaScript","readme":"# bit-loader-cache\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/MiguelCastillo/bit-loader-cache.svg)](https://greenkeeper.io/)\n\nCaching plugin for bit-loader. This helps increase build times after initial build.\n\n## compatible with:\n\n- [bit-bundler](https://github.com/MiguelCastillo/bit-bundler)\n\n\n# options and usage\n\n``` javascript\nconst Bitbundler = require(\"@bit/bundler\");\n\nconst bitbundler = new Bitbundler({\n  watch: true,\n  loader: [\n    \"@bit/loader-cache\"\n  ]\n})\n```\n\n## timeout\nWrite operations are throttled to prevent nasty issues with performance, and you can control how frequently write operations are retried (in milliseconds). Default value is `3000` milliseconds, which is 3 seconds.\n\n``` javascript\ncachePlugin({\n  timeout: 1000\n})\n```\n\n## dest\nFile name to write the cache to. Defaults to `.bundler-cache.json` and written to the current working directory.\n\n``` javascript\ncachePlugin({\n  dest: \"cache.json\"\n})\n```\n\n## connector\n\nThe cache plugin has the concept of connectors, which is basically a small interface you can implement for writing custom data sources.\n\nThe interface for a connector is relatively trivial and they are `Promise` compatible.\n\n- `set`, which takes in an id and a payload to store.\n- `get`, which takes the id from a `set` operation.\n- `flush` which is called whenever changes should be flushed.\n\nYou can take a look at the [default connector](https://github.com/MiguelCastillo/bit-loader-cache/blob/master/connectors/smallDB.js), which basically just writes to the local disk.\n\nOther connectors included are:\n\n- [elasticsearch connector](https://github.com/MiguelCastillo/bit-loader-cache/blob/master/connectors/elasticsearch.js)\n- [redis connector](https://github.com/MiguelCastillo/bit-loader-cache/blob/master/connectors/redis.js)\n\n\n## Examples\n\n### Elasticsearch\n\n``` javascript\nconst Bitbundler = require(\"@bit/bundler\");\nconst esConnector = require(\"@bit/loader-cache/connectors/elasticsearch\");\n\nconst bitbundler = new Bitbundler({\n  loader: [\n    [ \"@bit/loader-cache\", {\n      connector: esConnector({\n        host: \"localhost:9200\",\n        index: \"cache_example\",\n        type: \"modules\"\n      })\n    })\n  ]\n});\n\nbitbundler.bundle({\n  src: \"src/main.js\",\n  dest: \"dest/cache_plugin.js\"\n});\n```\n\n\n### Redis\n\nThe redis connector takes an optional flag `watch` that when set to true will keep the redis connector connected until the process is stopped. Otherwise, the redis connector exits when all the data is flushed.\n\n\n``` javascript\nconst Bitbundler = require(\"@bit/bundler\");\nconst redisConnector = require(\"@bit/loader-cache/connectors/redis\");\n\nconst bitbundler = new Bitbundler({\n  loader: [\n    [ \"@bit/loader-cache\", {\n      connector: redisConnector()\n    }]\n  ]\n});\n\nbitbundler.bundle({\n  src: \"src/main.js\",\n  dest: \"dest/cache_plugin.js\"\n});\n```\n\n\n## Docker\n\n### docker-compose\n\nThere are a couple of docker-compose files for spinning up elasticsearch and redis environments.  You can run whichever you want to work with.\n\n#### Elasticsearch\n\nTo spin up elasticsearch as well as kibana for a UI to run queries on elasticsearch (and more), you can use the `es-docker-compose.yml` configuration file.\n\n```\n$ docker-compose -f es-docker-compose.yml up\n```\n\nYou can go to [http://localhost:5601](http://localhost:5601) in order to access kibana in the browser to see the data stored in elasticsearch.\n\n#### Redis\n\nTo spin up a redis environment you can use the `redis-docker-compose.yaml` configuration file.\n\n\n```\n$ docker-compose -f redis-docker-compose.yml up\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcastillo%2Fbit-loader-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelcastillo%2Fbit-loader-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelcastillo%2Fbit-loader-cache/lists"}