{"id":15724219,"url":"https://github.com/codeation/lru","last_synced_at":"2026-01-25T19:34:31.252Z","repository":{"id":57557484,"uuid":"320595403","full_name":"codeation/lru","owner":"codeation","description":"Go asynchronous LRU cache","archived":false,"fork":false,"pushed_at":"2024-06-30T05:32:14.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-22T15:16:31.318Z","etag":null,"topics":["asynchronous","go","golang","in-memory","in-memory-caching","library","lru","lru-cache","module","once","sync"],"latest_commit_sha":null,"homepage":"","language":"Go","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/codeation.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":"2020-12-11T14:24:06.000Z","updated_at":"2025-05-14T18:49:46.000Z","dependencies_parsed_at":"2024-06-20T06:59:43.918Z","dependency_job_id":"a6dbe727-b0a6-4ccb-b6c9-239d5a1de029","html_url":"https://github.com/codeation/lru","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/codeation/lru","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Flru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Flru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Flru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Flru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeation","download_url":"https://codeload.github.com/codeation/lru/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeation%2Flru/sbom","scorecard":{"id":295927,"data":{"date":"2025-08-11","repo":{"name":"github.com/codeation/lru","commit":"27245dcf0c611244efa30ebdf7b5a629fba0d058"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/14 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":"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":"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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"}}]},"last_synced_at":"2025-08-17T19:29:54.577Z","repository_id":57557484,"created_at":"2025-08-17T19:29:54.577Z","updated_at":"2025-08-17T19:29:54.577Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28757361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"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":["asynchronous","go","golang","in-memory","in-memory-caching","library","lru","lru-cache","module","once","sync"],"created_at":"2024-10-03T22:15:37.007Z","updated_at":"2026-01-25T19:34:31.235Z","avatar_url":"https://github.com/codeation.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lru\n\nA lru is an asynchronous LRU cache (generic version).\n\n[![GoDoc](https://godoc.org/github.com/codeation/lru?status.svg)](https://godoc.org/github.com/codeation/lru)\n\n- based on golang map structure\n- prevents infinite cache growth\n- designed for asynchronous use\n\n# Usage\n\nFor example, caching the output of the ioutil.ReadFile function to reduce disk I/O.\n\n```\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/codeation/lru\"\n)\n\nfunc readFileContent(key string) ([]byte, error) {\n\tlog.Println(\"read once\")\n\treturn os.ReadFile(key)\n}\n\nfunc main() {\n\tcache := lru.NewSyncLRU(1024, readFileContent)\n\tfor i := 0; i \u003c 10; i++ {\n\t\tdata, err := cache.Get(\"input.txt\")\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t\tlog.Printf(\"file size is %d\\n\", len(data))\n\t}\n}\n```\n\nThe lru.NewSyncLRU parameter is the number of cache items until the last used item is removed from the cache. The second parameter is a func to get the value for the specified key and error.\n\nThe parameter of cache.Get func is a key (filename in this case). An error is returned when the function returns an error.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeation%2Flru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeation%2Flru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeation%2Flru/lists"}