yykaue opened a new pull request, #6914:
URL: https://github.com/apache/shenyu/pull/6914

   Fixes #6797 
   
   ## What this PR does
   @Aias00 
   
   Invalidate the rule match cache when a selector is deleted.
   
   Previously, selector deletion only removed entries from the selector match 
cache. Cached `RuleData` associated with the deleted selector could remain 
available, potentially causing requests to be routed using rules belonging to a 
deleted selector.
   
   This PR updates `CommonPluginDataSubscriber` to:
   
   - Remove cached rule data associated with the deleted selector.
   - Remove empty rule cache entries.
   - Keep rule cache entries belonging to unrelated selectors.
   
   ## Tests
   
   - Added a regression test covering selector deletion and rule match cache 
invalidation.
   - Verified that rules associated with the deleted selector are removed.
   - Verified that unrelated rule cache entries remain available.
   - Passed:
   
     ```text
     ./mvnw -pl shenyu-plugin/shenyu-plugin-base test
     Tests run: 113, Failures: 0, Errors: 0, Skipped: 0


-- 
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]

Reply via email to