Source:
<code>void removeTokenCacheItem(final TokenCacheItem tokenCacheItem, final String resource) throws AuthenticationException { CacheEvent cacheEvent = new CacheEvent(EventStrings.TOKEN_CACHE_DELETE); cacheEvent.setRequestId(mAuthRequest.getTelemetryRequestId()); Telemetry.getInstance().startEvent(mAuthRequest.getTelemetryRequestId(), EventStrings.TOKEN_CACHE_DELETE); final List<String> keys; final TokenEntryType tokenEntryType = tokenCacheItem.getTokenEntryType(); switch (tokenEntryType) { case REGULAR_TOKEN_ENTRY : cacheEvent.setTokenTypeRT(true); Logger.v(TAG, "Regular RT was used to get access token, remove entries " + "for regular RT entries."); keys = getKeyListToRemoveForRT(tokenCacheItem); break; case MRRT_TOKEN_ENTRY : <START> cacheEvent.setTokenTypeMRRT(true); <END> Logger.v(TAG, "MRRT was used to get access token, remove entries for both " + "MRRT entries and regular RT entries."); keys = getKeyListToRemoveForMRRT(tokenCacheItem); final TokenCacheItem regularRTItem = new TokenCacheItem(tokenCacheItem); regularRTItem.setResource(resource); keys.addAll(getKeyListToRemoveForRT(regularRTItem)); break; case FRT_TOKEN_ENTRY : cacheEvent.setTokenTypeFRT(true); Logger.v(TAG, "FRT was used to get access token, remove entries for " + "FRT entries."); keys = getKeyListToRemoveForFRT(tokenCacheItem); break; default : throw new AuthenticationException(ADALError.INVALID_TOKEN_CACHE_ITEM); } for (final String key : keys) { mTokenCacheStore.removeItem(key); } Telemetry.getInstance().stopEvent(mAuthRequest.getTelemetryRequestId(), cacheEvent, EventStrings.TOKEN_CACHE_DELETE); }</code><technical_language>cacheEvent.setTokenTypeMRRT(true); [](start = 12, length = 34) delete regular RT entry in this case. #Closed</technical_language>

Target:
void removeTokenCacheItem(final TokenCacheItem tokenCacheItem, final String resource) throws AuthenticationException { final CacheEvent cacheEvent = new CacheEvent(EventStrings.TOKEN_CACHE_DELETE); cacheEvent.setRequestId(mTelemetryRequestId); Telemetry.getInstance().startEvent(mTelemetryRequestId, EventStrings.TOKEN_CACHE_DELETE); final List<String> keys; final TokenEntryType tokenEntryType = tokenCacheItem.getTokenEntryType(); switch (tokenEntryType) { case REGULAR_TOKEN_ENTRY : cacheEvent.setTokenTypeRT(true); Logger.v(TAG, "Regular RT was used to get access token, remove entries " + "for regular RT entries."); keys = getKeyListToRemoveForRT(tokenCacheItem); break; case MRRT_TOKEN_ENTRY : cacheEvent.setTokenTypeMRRT(true); cacheEvent.setTokenTypeRT(true); Logger.v(TAG, "MRRT was used to get access token, remove entries for both " + "MRRT entries and regular RT entries."); keys = getKeyListToRemoveForMRRT(tokenCacheItem); final TokenCacheItem regularRTItem = new TokenCacheItem(tokenCacheItem); regularRTItem.setResource(resource); keys.addAll(getKeyListToRemoveForRT(regularRTItem)); break; case FRT_TOKEN_ENTRY : cacheEvent.setTokenTypeFRT(true); Logger.v(TAG, "FRT was used to get access token, remove entries for " + "FRT entries."); keys = getKeyListToRemoveForFRT(tokenCacheItem); break; default : throw new AuthenticationException(ADALError.INVALID_TOKEN_CACHE_ITEM); } for (final String key : keys) { mTokenCacheStore.removeItem(key); } Telemetry.getInstance().stopEvent(mTelemetryRequestId, cacheEvent, EventStrings.TOKEN_CACHE_DELETE); }