Only invalidate variant cache when modified#1645
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces conditional cache invalidation for the VariantSet class, optimizing cache management by only invalidating the cache when a mutation actually occurs. It adds a new @invalidates_cache decorator and corresponding unit tests. The feedback highlights two key areas for improvement: first, the Variant class needs __eq__ and __hash__ implementations to prevent identity-based comparisons from defeating the cache optimization; second, the @invalidates_cache decorator should use functools.wraps to preserve the metadata of the decorated methods.
f41dd1a to
0dc3379
Compare
Ramble Performance Test MetricsResults produced with commit: 0dc3379
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1645 +/- ##
========================================
Coverage 93.29% 93.30%
========================================
Files 352 352
Lines 34188 34233 +45
========================================
+ Hits 31896 31941 +45
Misses 2292 2292 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b33e329
into
GoogleCloudPlatform:develop
No description provided.