{"id":20345989,"url":"https://github.com/lupcode/node-lup-caches","last_synced_at":"2026-05-13T02:02:25.359Z","repository":{"id":113255729,"uuid":"387382592","full_name":"LupCode/node-lup-caches","owner":"LupCode","description":"Node module that offers different caches","archived":false,"fork":false,"pushed_at":"2021-08-03T20:08:40.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T01:39:56.267Z","etag":null,"topics":["caches","fixed-size","lfu-cache","node-module","nodejs"],"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/LupCode.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":"2021-07-19T07:50:34.000Z","updated_at":"2021-08-03T20:08:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c121dd2-b170-4cc3-80cb-5ecbdc70680d","html_url":"https://github.com/LupCode/node-lup-caches","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.4285714285714286,"last_synced_commit":"1bc6c0e0b26868e36b632ac07adc0b3563d005f4"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/LupCode/node-lup-caches","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LupCode%2Fnode-lup-caches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LupCode%2Fnode-lup-caches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LupCode%2Fnode-lup-caches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LupCode%2Fnode-lup-caches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LupCode","download_url":"https://codeload.github.com/LupCode/node-lup-caches/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LupCode%2Fnode-lup-caches/sbom","scorecard":{"id":86898,"data":{"date":"2025-08-11","repo":{"name":"github.com/LupCode/node-lup-caches","commit":"1bc6c0e0b26868e36b632ac07adc0b3563d005f4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/15 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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"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":"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":"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":"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 'main'"],"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"}}]},"last_synced_at":"2025-08-15T07:07:05.831Z","repository_id":113255729,"created_at":"2025-08-15T07:07:05.832Z","updated_at":"2025-08-15T07:07:05.832Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32964444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"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":["caches","fixed-size","lfu-cache","node-module","nodejs"],"created_at":"2024-11-14T22:10:39.934Z","updated_at":"2026-05-13T02:02:25.330Z","avatar_url":"https://github.com/LupCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lup-caches\nNode module that offers efficient caches that store key-value pairs.\n\n## How to use\n1. Install with the following command `npm install lup-caches`  \n2. Reference in your NodeJS project by adding `const caches = require('lup-caches');`.  \nSee [Examples](#examples)\n\n## Available Classes\n#### `FixedSizeLFUCache`\nFixed size cache storing key-value pairs such that total  \nbyte size of stored values will not exceed given limit.  \nUses the LFU algortihm (least frequently used) to evict entries if cache is full.  \nAdditionally an expire interval can be set (passive on put call) that repeatedly halfs  \nthe access counter of each entry.  \n\n#### `FixedCountLFUCache`\nCache storing fixed amount of key-value pairs.  \nUses the LFU algortihm (least frequently used) to evict entries if cache is full.  \nAdditionally an expire interval can be set (passive on put call) that repeatedly halfs  \nthe access counter of each entry.  \n\n#### `FixedSizeLRUCache`\nFixed size cache storing key-value pairs such that total \nbyte size of stored values will not exceed given limit. \nUses the LRU algortihm (least recently used) to evict entries if cache is full. \nCheaper and faster than LFU but not as many cache hits.  \n\n#### `FixedCountLRUCache`\nCache storing fixed amount of key-value pairs.\nUses the LRU algortihm (least recently used) to evict entries if cache is full. \nCheaper and faster than LFU but not as many cache hits.  \n\n\n## Examples\n```javascript\nconst {FixedSizeLFUCache} = require('lup-caches');\n\nlet maxSize = 10.5; // MB\nlet cache = new FixedSizeLFUCache(maxSize);\n\ncache.put(\"test\", \"Hello World\");\ncache.put(\"abc\", Buffer.from(\"e.g. contents of a file. Must not be of type string\"));\n\ncache.get(\"test\"); // returns \"Hello World\" if entry still in cache\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupcode%2Fnode-lup-caches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flupcode%2Fnode-lup-caches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupcode%2Fnode-lup-caches/lists"}