Skip to content

Feature/issue 214 groovy cache sync 17x - #217

Merged
xlorne merged 2 commits into
mainfrom
feature/issue-214-groovy-cache-sync-17x
Nov 10, 2026
Merged

xlorne merged 2 commits into
mainfrom
feature/issue-214-groovy-cache-sync-17x

Conversation

@xlorne

@xlorne xlorne commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Describe what this PR does / why we need it

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

Special notes for reviews

- 新增 GroovyScriptCacheEvent(ISyncEvent):脚本保存/删除后经 EventPusher 进程内分发,业务可通过 IHandler 监听脚本变更
- 新增 GroovyScriptCacheSync SPI(默认 LocalGroovyScriptCacheSync):多实例部署时可接入 Redis pub/sub 等实现跨实例广播,远端实例 receive 后失效本地缓存并回源仓储
- 新增 GroovyScriptCache 缓存容器接口与 DefaultGroovyScriptCache:LRU 容器抽象为可替换策略,支持 Redis 等共享缓存实现
- GroovyScript.save()/remove() 写路径发布缓存变更事件;GroovyScriptCacheContext.remove 改为纯本地失效

Closes #214
…ript)

- 能力文档新增多实例部署章节:部署前提(共享仓储 + 跨实例失效同步)
- 提供 Redis pub/sub 失效同步(GroovyScriptCacheSync)完整实现示例(推荐方案)
- 提供 Redis 共享缓存容器(GroovyScriptCache)实现示例(可选方案)
- 补充行为说明与注意事项(回环过滤、SHA256 编译缓存自愈、临时脚本进程内语义)

Ref #214
@xlorne
xlorne merged commit 9713666 into main Nov 10, 2026
1 check passed
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.84615% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.36%. Comparing base (0dcd170) to head (e5a67f0).
⚠️ Report is 97 commits behind head on main.

Files with missing lines Patch % Lines
...oot/script/cache/GroovyScriptCacheSyncContext.java 86.66% 1 Missing and 1 partial ⚠️
...ingboot/script/cache/GroovyScriptCacheContext.java 92.85% 0 Missing and 1 partial ⚠️
...pringboot/script/cache/GroovyScriptCacheEvent.java 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #217      +/-   ##
============================================
+ Coverage     87.32%   87.36%   +0.03%     
- Complexity     2156     2177      +21     
============================================
  Files           211      215       +4     
  Lines          5894     5944      +50     
  Branches        408      408              
============================================
+ Hits           5147     5193      +46     
- Misses          602      603       +1     
- Partials        145      148       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xlorne
xlorne deleted the feature/issue-214-groovy-cache-sync-17x branch November 10, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant