GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: Groovy 脚本缓存增加跨实例失效同步与可插拔缓存策略 (8.x/springboot-starter-script) by xlorne · Pull Request #221 · codingapi/springboot-framework

Conversation

@xlorne

@xlorne xlorne commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

同步 17.x 的 issue #214 修复,按 JDK 8 做代际适配:

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

Ref #214

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@xlorne
fix: Groovy 脚本缓存增加跨实例失效同步与可插拔缓存策略 (8.x/springboot-starter-script)
679874a
同步 17.x 的 issue #214 修复,按 JDK 8 做代际适配:
- 新增 GroovyScriptCacheEvent(ISyncEvent):脚本保存/删除后经 EventPusher 进程内分发,业务可通过 IHandler 监听脚本变更
- 新增 GroovyScriptCacheSync SPI(默认 LocalGroovyScriptCacheSync):多实例部署时可接入 Redis pub/sub 等实现跨实例广播,远端实例 receive 后失效本地缓存并回源仓储
- 新增 GroovyScriptCache 缓存容器接口与 DefaultGroovyScriptCache:LRU 容器抽象为可替换策略,支持 Redis 等共享缓存实现
- GroovyScript.save()/remove() 写路径发布缓存变更事件;GroovyScriptCacheContext.remove 改为纯本地失效
- 能力文档补充多实例部署章节与 Redis 实现方案示例

Ref #214
@xlorne
xlorne merged commit 0595d15 into 8.2.x Nov 10, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@xlorne
xlorne deleted the feature/issue-214-groovy-cache-sync-8x branch November 10, 2026 11:42
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.36620% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.20%. Comparing base (85f3849) to head (679874a).
⚠️ Report is 2 commits behind head on 8.2.x.

Files with missing lines Patch % Lines
...oot/script/cache/GroovyScriptCacheSyncContext.java 88.23% 1 Missing and 1 partial ⚠️
...ingboot/script/cache/GroovyScriptCacheContext.java 92.85% 0 Missing and 1 partial ⚠️
...pringboot/script/cache/GroovyScriptCacheEvent.java 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              8.2.x     #221      +/-   ##
============================================
+ Coverage     87.17%   87.20%   +0.03%     
- Complexity     2329     2357      +28     
============================================
  Files           213      217       +4     
  Lines          6120     6176      +56     
  Branches        411      411              
============================================
+ Hits           5335     5386      +51     
- Misses          641      643       +2     
- Partials        144      147       +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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@xlorne
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.