Version the cache keys of the info provider DTOs - #1530
Merged
jbtronics merged 1 commit intoSep 12, 2026
Merged
Conversation
The info provider system caches the DTOs it received from a provider as serialized objects, in a cache pool which is not part of the cache directory and therefore survives an update of Part-DB. Whenever a DTO class gains a property, unserializing an object which was cached by an older version leaves that property uninitialized, so the first access to it fails with a typed property error until the cache happens to expire (up to four days later). Add a version marker to every cache key of a DTO, which has to be increased whenever the structure of the DTOs changes: old entries are then simply never read again and expire on their own. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1530 +/- ##
============================================
- Coverage 62.39% 62.37% -0.02%
Complexity 9879 9879
============================================
Files 736 736
Lines 31779 31779
============================================
- Hits 19829 19823 -6
- Misses 11950 11956 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Looks good. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The info provider system caches the DTOs it received from a provider as serialized objects, in a cache pool which is not part of the cache directory and therefore survives an update of Part-DB.
Whenever a DTO class gains a property, unserializing an object which was cached by an older version leaves that property uninitialized, so the first access to it fails with a typed property error until the cache happens to expire (up to four days later).
Add a version marker to every cache key of a DTO, which has to be increased whenever the structure of the DTOs changes: old entries are then simply never read again and expire on their own.