fix: defer cache invalidation during transactions and add tenant-aware cache keys#434
Open
tnschneider wants to merge 6 commits into
Open
fix: defer cache invalidation during transactions and add tenant-aware cache keys#434tnschneider wants to merge 6 commits into
tnschneider wants to merge 6 commits into
Conversation
added 5 commits
May 13, 2026 14:08
…ct transaction parameter in delete client
…support - Add ITenantEntityCacheKeyResolver interface and TenantEntityCacheKeyResolver implementation to resolve tenant-specific cache key segments - Register TenantEntityCacheKeyResolver in service collection for entity cache configurations - Update DefaultEntityCacheService to incorporate tenant ID segments into cache keys for tenant entities
…is active - Update EntityFramework and Mongo update/delete services to enroll cache invalidation functions in transaction outbox instead of immediate removal when transaction exists - Remove redundant cache invalidation from soft delete services since update service handles it - Add comprehensive unit tests verifying transactional cache invalidation behavior for both EntityFramework and Mongo implementations - Ensure cache is removed
…vices - Remove IEntityCacheService parameter and unused cache service discard from EntityFrameworkEntitySoftDeleteService - Remove IEntityCacheService parameter and unused cache service discard from MongoEntitySoftDeleteService - Cache invalidation is already handled by update service, making direct cache service dependency redundant
…yCacheKeyResolver - Replace if-null-throw blocks with inline throw expressions for tenant provider and tenant resolution - Add explicit public modifier to ITenantEntityCacheKeyResolver interface method
…vider resolution - Change TenantEntityCacheKeyMetadata dictionary to static to share metadata across instances - Update GetTenantIdSegmentAsync delegate signature to accept IServiceProvider parameter instead of capturing it - Defer service provider resolution until cache key generation time by passing serviceProvider to delegate invocation - Remove serviceProvider parameter from CreateGetTenantIdSegmentAsync method invocation since
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.
No description provided.