Branch: refs/heads/CRAPP-438-cache Home: https://github.com/xwiki-contrib/application-changerequest Commit: 735c419008bc02095fe4764d31296a8156ffcec1 https://github.com/xwiki-contrib/application-changerequest/commit/735c419008... Author: Simon Urli <[email protected]> Date: 2026-09-18 (Fri, 18 Sep 2026) Changed paths: M application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/cache/ChangeRequestStorageCacheManager.java M application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/storage/DefaultChangeRequestStorageManager.java A application-changerequest-default/src/test/java/org/xwiki/contrib/changerequest/internal/cache/ChangeRequestStorageCacheManagerTest.java M application-changerequest-default/src/test/java/org/xwiki/contrib/changerequest/internal/storage/DefaultChangeRequestStorageManagerTest.java Log Message: ----------- CRAPP-438: Review invalidation is skipped when a stale change request is served from the storage cache * Give every change request identifier a generation in ChangeRequestStorageCacheManager, incremented by each invalidation, so that a loader which read the documents before an invalidation can be told apart from one which read them after it * Read that generation through the new startLoading before the documents are read in DefaultChangeRequestStorageManager#load, and hand it back to cacheChangeRequest, which now stores the change request only when the generation is unchanged: an instance built from data that an invalidation has already superseded is dropped instead of being served to every later request * Keep a tombstone carrying the generation instead of removing the entry on invalidation, so that a load started earlier can see that the invalidation happened, and treat the absence of that entry, from an eviction or from invalidateAll, as a reason not to cache * Add unit tests for the cache manager covering the invalidation of a change request being loaded, the disappearance of its entry, and a slow loader finishing after a fresher one * Assert in DefaultChangeRequestStorageManagerTest that the generation is read before the documents and handed back untouched Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/application-changerequest/settings/notifica...