Skip to content

Add cache eviction for PartnerMappingRepository updates#80

Draft
Copilot wants to merge 2 commits into
tf_nira_devfrom
copilot/find-cache-evict-location
Draft

Add cache eviction for PartnerMappingRepository updates#80
Copilot wants to merge 2 commits into
tf_nira_devfrom
copilot/find-cache-evict-location

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 11, 2026

PartnerMappingRepository caches partner mapping queries but never evicted stale entries when mappings were updated via event handlers, causing cached data to persist until application restart.

Changes

  • Added @CacheEvict annotations to handleApiKeyApproved() and createOIDCClientData() in PartnerServiceManager
  • Both methods now evict PARTNER_API_KEY_DATA and PARTNER_API_KEY_POLICY_ID_DATA caches using allEntries = true
@CacheEvict(value = {IdAuthCommonConstants.PARTNER_API_KEY_DATA, 
                     IdAuthCommonConstants.PARTNER_API_KEY_POLICY_ID_DATA}, 
            allEntries = true)
public void handleApiKeyApproved(EventModel eventModel) throws ... {
    // ... saves PartnerMapping via partnerMappingRepo.save(mapping)
}

Follows the existing cache eviction pattern from MasterDataCache.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.danubetech.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/id-authentication/id-authentication/authentication/authentication-common org.codehaus.plexus.classworlds.launcher.Launcher clean compile -DskipTests -q (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/id-authentication/id-authentication/authentication org.codehaus.plexus.classworlds.launcher.Launcher -f pom.xml -B -V -e -Dfindbugs.skip -Dcheckstyle.skip -Dpmd.skip=true -Dspotbugs.skip -Denforcer.skip -Dmaven.javadoc.skip (dns block)
  • repository.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/id-authentication/id-authentication/authentication/authentication-common org.codehaus.plexus.classworlds.launcher.Launcher clean compile -DskipTests -q (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Find location for cache evicting in PartnerMappingRepository Document missing cache eviction for PartnerMappingRepository Mar 11, 2026
Co-authored-by: Nagarjunakuchi88 <64436505+Nagarjunakuchi88@users.noreply.github.com>
Copilot AI changed the title Document missing cache eviction for PartnerMappingRepository Add cache eviction for PartnerMappingRepository updates Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants