{"id":44689700,"url":"https://github.com/gshjd/RainbowCache","last_synced_at":"2026-02-27T19:01:18.932Z","repository":{"id":54175109,"uuid":"344421743","full_name":"gshjd/RainbowCache","owner":"gshjd","description":"一套缓存注解，内置利用redis完成的并发锁，提高开发效率，让开发人员更专注于业务","archived":false,"fork":false,"pushed_at":"2023-03-10T10:12:44.000Z","size":60,"stargazers_count":97,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T00:56:16.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gshjd.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":"2021-03-04T09:38:07.000Z","updated_at":"2025-05-14T19:36:04.000Z","dependencies_parsed_at":"2022-08-13T08:20:44.431Z","dependency_job_id":null,"html_url":"https://github.com/gshjd/RainbowCache","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gshjd/RainbowCache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gshjd%2FRainbowCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gshjd%2FRainbowCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gshjd%2FRainbowCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gshjd%2FRainbowCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gshjd","download_url":"https://codeload.github.com/gshjd/RainbowCache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gshjd%2FRainbowCache/sbom","scorecard":{"id":447184,"data":{"date":"2025-08-11","repo":{"name":"github.com/gshjd/RainbowCache","commit":"bc4445f6ea8e04a2e87ee090cff5574c7cc5fa91"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/23 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":"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":"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: Apache License 2.0: 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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.1.0-beta not signed: https://api.github.com/repos/gshjd/RainbowCache/releases/39704754","Warn: release artifact v1.1.0-beta does not have provenance: https://api.github.com/repos/gshjd/RainbowCache/releases/39704754"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}},{"name":"Vulnerabilities","score":0,"reason":"29 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-vmq6-5m68-f53m","Warn: Project is vulnerable to: GHSA-668q-qrv7-99fm","Warn: Project is vulnerable to: GHSA-6v67-2wr5-gvf4","Warn: Project is vulnerable to: GHSA-pr98-23f8-jwxv","Warn: Project is vulnerable to: GHSA-9vjp-v76f-g363","Warn: Project is vulnerable to: GHSA-grg4-wf29-r9vv","Warn: Project is vulnerable to: GHSA-389x-839f-4rhx","Warn: Project is vulnerable to: GHSA-xq3w-v528-46rv","Warn: Project is vulnerable to: GHSA-6mjq-h674-j845","Warn: Project is vulnerable to: GHSA-rc42-6c7j-7h5r","Warn: Project is vulnerable to: GHSA-xf96-w227-r7c4","Warn: Project is vulnerable to: GHSA-36p3-wjmg-h94x","Warn: Project is vulnerable to: GHSA-hh26-6xwr-ggv7","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264","Warn: Project is vulnerable to: GHSA-g5mm-vmx4-3rg7","Warn: Project is vulnerable to: GHSA-6gf2-pvqw-37ph","Warn: Project is vulnerable to: GHSA-rfmp-97jj-h8m6","Warn: Project is vulnerable to: GHSA-558x-2xjg-6232","Warn: Project is vulnerable to: GHSA-564r-hj7v-mcr5","Warn: Project is vulnerable to: GHSA-9cmq-m9j5-mvww","Warn: Project is vulnerable to: GHSA-wxqc-pxw9-g2p8","Warn: Project is vulnerable to: GHSA-3mc7-4q67-w48m","Warn: Project is vulnerable to: GHSA-98wm-3w3q-mw94","Warn: Project is vulnerable to: GHSA-9w3m-gqgf-c4p9","Warn: Project is vulnerable to: GHSA-c4r9-r8fh-9vj2","Warn: Project is vulnerable to: GHSA-hhhw-99gj-p3c3","Warn: Project is vulnerable to: GHSA-mjmj-j48q-9wg2","Warn: Project is vulnerable to: GHSA-w37g-rhq8-7m4j"],"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-19T07:07:03.508Z","repository_id":54175109,"created_at":"2025-08-19T07:07:03.508Z","updated_at":"2025-08-19T07:07:03.508Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29909252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"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":[],"created_at":"2026-02-15T07:00:30.139Z","updated_at":"2026-02-27T19:01:18.924Z","avatar_url":"https://github.com/gshjd.png","language":"Java","funding_links":[],"categories":["缓存库"],"sub_categories":["Spring Cloud框架"],"readme":"# RainbowCache\n\n### 您的star是我继续前进的动力，如果喜欢请帮忙点个star\n\n## 简介\n\n一套缓存注解，缓存可选择使用本地缓存或redis缓存，内置利用redis完成的并发锁（使用并发锁注解一定要接入redis），提高开发效率，让开发人员更专注于业务。\n\n该缓存在redis挂掉的情况下，会自动切换本地缓存，以防止击穿DB。\n\n## POM引入\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecn.threeoranges\u003c/groupId\u003e\n  \u003cartifactId\u003eRainbowCache\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## 注解使用\n\n注解仅适用于Service实现层方法。\n\n### 1. @RainbowCache\n\n注解中含有key,dynamicKey,expiration,renew四个属性。\n\n用于获取业务中的返回值并存入缓存中，若缓存中存在该key，则直接从缓存中获取。\n\n#### key\n\nString数组类型，固定键，可以有多个，缓存中固定不变的键。\n\n#### dynamicKey\n\nString类型，动态键，根据el表达式，获取指定参数得到的动态键。\n\n`注：最终缓存键 = key + dynamicKey。`\n\n#### expiration\n\nlong类型，缓存有效时间，默认为-1，永久不失效，单位为秒。\n\n#### renew\n\nboolean类型，是否需要续约，默认false，每当访问时自动续约时长。\n\n### 2. @RainbowCachePut\n\n注解中含有key,dynamicKey,expiration,renew四个属性。\n\n每个属性和@RainbowCache注解一致，与@RainbowCache注解不同的是，该注解不会从缓存中读取数据，每次都会执行后续业务获取数据，更新缓存中的值。\n\n### 3. @RainbowCacheClear\n\n注解中含有key,dynamicKey,两个属性。\n\n两个属性介绍和@RainbowCache注解一致。该注解仅用来清理缓存，支持范围清理，前缀为`key + dynamicKey`下的所有缓存都将被清除。\n\n### 4. @RainbowDistributedLock\n\n注解中含有key一个属性。\n\nkey属性表示改锁的唯一键，用来控制锁的唯一性。该注解会对方法进行加锁，业务执行完成以后解锁。\n\n## 配置\n\n### 1. rainbow.cache.type\n\n缓存模式 simple或redis，默认simple（simple 本地缓存）\n\n### 2. rainbow.cache.lock.time-out\n\n分布式锁超时时间(毫秒)，默认30，单位为秒，-1为永不超时\n\n### 3.rainbow.cache.lock.length\n\n本地缓存空间长度，默认Integer的最大值\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgshjd%2FRainbowCache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgshjd%2FRainbowCache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgshjd%2FRainbowCache/lists"}