Merged
Conversation
- Fix #1615/#1667: Change LinksResend.resend to array type (List<HrefObject>) - Fix #1618: Add type validation for cached objects to prevent ClassCastException - Fix #1619: Set default name for OIDCApplicationBuilder to OIDC_CLIENT - Fix #1622: Correct expirePasswordWithTempPassword return type to TempPassword - Fix #1642: Enable custom attributes for GroupProfile (OktaUserGroupProfile) - Fix #1666: Change JUnit dependency scope from compile to test - Fix #1657: Upgrade httpclient5 to 5.5.1 to fix connection pool leak - Fix #1653: Add missing rootSessionId field to LogAuthenticationContext - Fix #1650: Enable super.equals() call in PasswordPolicyRule for proper parent comparison - Fix #1600: Implement resource-specific cache lookup in ApiClient - Update SDK version to 25.0.1-SNAPSHOT All fixes verified and tested. Resource-specific caching demonstrated with User cache (5s TTL) showing 0ms cache hits vs 500ms API calls.
…1600) - Fixed cache invalidation for DELETE operations on nested resources - Added support for FederatedClaimRequestBody cache invalidation - Fixed path matching for /federated-claims/ and /group-push/mappings/ - Implemented multi-cache invalidation to remove from all matching caches - Added defensive exception handling to prevent cache errors from interfering with API operations Resolves: - #1618: Cache ClassCastException with type validation - #1600: Resource-specific cache configuration All integration tests passing (431 tests, 0 failures)
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.
All fixes verified and tested. Resource-specific caching demonstrated with User cache (5s TTL) showing 0ms cache hits vs 500ms API calls.
Here's a comprehensive explanation of the caching changes:
Caching System Improvements
Problem Statement
The SDK's cache invalidation logic had several critical issues causing stale cache entries after mutating operations (DELETE/PUT/POST), leading to integration test failures where deleted resources were still being returned from cache instead of throwing 404 errors.
Root Causes Identified
Cross-Cache Invalidation Gap: Lifecycle operations (e.g.,
/users/{id}/lifecycle/suspend) used the default cache, but subsequent GET operations used resource-specific caches (e.g.,Usercache), causing stale data.Nested Resource Path Mismatch:
/federated-claims/not/claims//group-push/mappings/not/push-mappings/Multiple Model Types: Some resources have multiple model classes (e.g.,
FederatedClaimandFederatedClaimRequestBody). DELETE invalidated one, but GET used the other, leaving stale cache.Single-Cache Strategy: Original logic invalidated only ONE cache per operation, but nested resources like
/apps/{id}/sso/claims/{id}should invalidate from BOTH Application AND FederatedClaim caches.Solution Implemented
1. Multi-Cache Invalidation Strategy
2. Correct Path Pattern Matching
/federated-claims/detection (not just/claims/)/group-push/mappings/detection (not just/push-mappings/)3. Comprehensive Invalidation on Mutating Operations
4. Defensive Exception Handling
This ensures cache errors never mask legitimate API errors (like 404s).
Impact
Technical Details
Issue(s)
Description
Category
Signoff