sunnysabor opened a new pull request, #7664: URL: https://github.com/apache/shenyu/pull/7664
Fixes #7651. MatchDataCache currently retains positive and negative matches until eviction or event-driven invalidation. Add expire-after-write to selector and rule caches with a 60-second default. Configure each independently through `shenyu.selectorMatchCache.cache.ttl` and `shenyu.ruleMatchCache.cache.ttl` (positive milliseconds). Existing cache methods remain available and use the default lifetime. Bootstrap YAML comments describe the reuse/staleness trade-off; event-driven invalidation remains unchanged. TTL bounds reuse of derived match results. It cannot recover a missed update to BaseDataCache itself: expiration rematches against the gateway's current local configuration. Caffeine stops returning expired entries; physical cleanup follows its maintenance cycle. Configuration is applied when each plugin cache is created. Validation: - New positive/negative selector/rule expiration regression fails with the previous non-expiring map constructor and passes with this fix. - `./mvnw -B -ntp -pl shenyu-plugin/shenyu-plugin-base -am test -Djacoco.skip=true` passes (11-module reactor, including existing match and invalidation tests). - `./mvnw -B -ntp checkstyle:check` passes across 213 modules. - Related reactor `apache-rat:check` passes in a clean source export with the patch. The original checkout's RAT check only flags three pre-existing untracked `.omx` files. - `git diff --check` passes. No performance benchmark or full-repository clean install was run. - [x] I have read the contribution guidelines. - [x] Tests back the changes. - [ ] Full `./mvnw clean install -Dmaven.javadoc.skip=true` (targeted reactor tests and full Checkstyle used instead). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
