Source:
public Response invalidatesCacheByTenant(@javax.ws.rs.core.Context final HttpServletRequest request) throws TenantApiException { final TenantContext tenantContext = context.createTenantContextNoAccountId(request); final Tenant currentTenant = tenantApi.getTenantById(tenantContext.getTenantId()); final Long tenantRecordId = recordIdApi.getRecordId(tenantContext.getTenantId(), ObjectType.TENANT, tenantContext); final Function<String, Boolean> tenantKeysMatcher = new Function<String, Boolean>() { @Override public Boolean apply(@Nullable final String key) { return key != null && key.endsWith("::" + tenantRecordId); } }; final CacheController<String, Long> tenantRecordIdCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_RECORD_ID); tenantRecordIdCacheController.remove(currentTenant.getId().toString()); final CacheController<String, Object> tenantPaymentStateMachineConfigCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_PAYMENT_STATE_MACHINE_CONFIG); tenantPaymentStateMachineConfigCacheController.remove(tenantKeysMatcher); final CacheController<String, Tenant> tenantCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT); tenantCacheController.remove(currentTenant.getApiKey()); final CacheController<String, String> tenantKVCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_KV); tenantKVCacheController.remove(tenantKeysMatcher); final CacheController<Long, PerTenantConfig> tenantConfigCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_CONFIG); tenantConfigCacheController.remove(tenantRecordId); final CacheController<Long, Object> tenantOverdueConfigCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_OVERDUE_CONFIG); tenantOverdueConfigCacheController.remove(tenantRecordId); final CacheController<Long, List<StaticCatalog>> tenantCatalogCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_CATALOG); tenantCatalogCacheController.remove(tenantRecordId); return Response.status(Status.NO_CONTENT).build(); }

Target:
public Response invalidatesCacheByTenant(@javax.ws.rs.core.Context final HttpServletRequest request) throws TenantApiException { final TenantContext tenantContext = context.createTenantContextNoAccountId(request); final Tenant currentTenant = tenantApi.getTenantById(tenantContext.getTenantId()); final Long tenantRecordId = recordIdApi.getRecordId(tenantContext.getTenantId(), ObjectType.TENANT, tenantContext); final Function<String, Boolean> tenantKeysMatcher = new Function<String, Boolean>() { @Override public Boolean apply(@Nullable final String key) { return key != null && key.endsWith("::" + tenantRecordId); } }; final CacheController<String, Long> tenantRecordIdCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_RECORD_ID); tenantRecordIdCacheController.remove(currentTenant.getId().toString()); final CacheController<String, Object> tenantPaymentStateMachineConfigCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_PAYMENT_STATE_MACHINE_CONFIG); tenantPaymentStateMachineConfigCacheController.remove(tenantKeysMatcher); final CacheController<String, Tenant> tenantCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT); tenantCacheController.remove(currentTenant.getApiKey()); final CacheController<String, String> tenantKVCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_KV); tenantKVCacheController.remove(tenantKeysMatcher); final CacheController<Long, PerTenantConfig> tenantConfigCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_CONFIG); tenantConfigCacheController.remove(tenantRecordId); final CacheController<Long, Object> tenantOverdueConfigCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_OVERDUE_CONFIG); tenantOverdueConfigCacheController.remove(tenantRecordId); final CacheController<Long, VersionedCatalog> tenantCatalogCacheController = cacheControllerDispatcher.getCacheController(CacheType.TENANT_CATALOG); tenantCatalogCacheController.remove(tenantRecordId); return Response.status(Status.NO_CONTENT).build(); }