Regions in production

The inventory of every region CNH runs, with its facade, kind, key, TTL, domain and Redis root. Review new region names against this list before adding one — names are a contract on a shared backbone.

On this page

    indc-core — master data (static)

    Declared by @CacheSnapshot on the entity in indc-commons-lib, preloaded by the master-data starter, read through a facade in com.juliusbaer.channels.indc.core.cache.masterdata. Root: indc-core:cache. Refreshed by refresh-cron and startup: reload-if-stale (both Octopus variables).

    regionfacadekeyindexesreads
    eventConfigEventConfigurationCacheidbyEventName, byEventTypebyId, byEventType (repo fallback), byEventName
    eventTemplateEventTemplateCacheidbyTemplateName, byChannelSegmentLanguage, byCriteria (multi)byId, byTemplateName, byChannelSegmentLanguage, byCriteria (sorted)
    eventGroupEventGroupCacheidbyGroupNamebyId, byGroupName
    alertsAlertsCacheidbyAlertNamebyId, byAlertName
    alertChannelMappingAlertChannelMappingCacheidbyAlertChannelKey, byAlertsId (multi)byId, byAlertChannelKey, byAlertsId (repo fallback)
    bookingCentreMappingBookingCentreMappingCacheidbyEventBookingCentreKey, byConfigAndCentrebyId, byEventBookingCentreKey, byConfigAndCentre
    eventSegmentsMappingEventSegmentsMappingCacheidbyEventSegmentKey, byEventConfigId (multi)byId, byEventSegmentKey, byEventConfigId (repo fallback)

    RedirectRoute also carries @CacheSnapshot(region = "redirectRoute") but has no facade yet.

    indc-core — user alerts (transactional, shared)

    regionfacadekeyvalueTTLrootgate
    userAlertsUserAlertsCacheloginIdUserAlertsByLogin (list of UserAlertsSnapshot with config, conditions, devices)5 m (CNH.indc.dac.cache.regions.userAlerts.l2Ttl)dac:userAlerts (UserAlertsCacheContract.NAMESPACE)app.cache.user-alerts.read-enabled

    The region is shared: indc-core reads it for the evaluator; alert-be-app's UserAlertsCacheEviction.evictUser(loginId) calls DacRegionEvictions.evictShared(NAMESPACE, REGION, loginId) on every write path. The read flag stays off until every writer is confirmed to evict.

    indc-core — external lookups (transactional, cache-aside)

    Facades in com.juliusbaer.channels.indc.core.cache.external. These replaced the Spring @Cacheable configuration; each has a domain flag and a 1 000-entry local fallback. Keys are composed with LookupKeys.of(…) (parts joined by |). Roots: dac:<domain>.

    regionfacadevalueTTLdomaincall site
    ldapUsersLdapUserCacheLdapUserAttributes30 mldap-userLdapBaseService.getUserDetails
    userPreferencesUserPreferenceCacheUserPreferencesSnapshot30 muser-preferenceDeliveryInstructionClient.findUserPreferencesClient
    pasRelationshipsPasRelationshipCacheBusinessRelationshipResponseDTO30 mpas-userPasServiceImpl
    pasRelationshipManagersPasRelationshipManagerCacheBusinessRelationshipsResponse30 mpas-userPasServiceImpl
    idmUnitsIdmUnitCacheUnit30 midm-userIDMServiceImpl
    idmUsersIdmUserCacheUser30 midm-userIDMServiceImpl.getUsersById
    paoAuthorizedPortfoliosPaoAuthorizedPortfolioCacheAccessDecisionResponse60 mpao-authorized-portfolioPaoServiceImpl
    craRelationshipManagersCraRelationshipManagerCacheCraRelationshipManager60 mcra-relationship-managerCraServiceImpl.getRelationshipManagerId

    TTLs come from CNH.indc.cache.ttl.*, flags from CNH.indc.cache.enabled.* — the same Octopus variables the old configuration used.

    alert-be-app

    regionfacadekeyvalueTTLnotes
    userDevicesUserDevicesCacheuserIdUserDevicesSnapshot (from IDM, via IdmUserDevicesLoader)5 m (CNH.alert.dac.cache.regions.userDevices.l2Ttl)read-through; 10 000-entry local fallback; evict(userId) on device changes

    Shared CAST domain (all applications)

    Provided by cache-domain-cast under dac:cast; TTL dac.domains.cast.ttl-minutes (180) except preferences (15). Read through CastDacGateway and @CastAuthContext; details on The CAST domain.

    regionkeyvalue
    castJbUidsidType|valueCastJbUids
    castUsersjbUidUserDto
    castUserProfilesjbUidUserProfileDto
    castUserEntitlementsjbUid (+ filter)UserEntitlementsDto
    castUserBootstrapjbUidUserBootstrapDto
    castPreferencesjbUid (+ filter)List<PreferenceDto>
    castUserBRs · castUserPortfolios · castUserAccountsjbUid|numbershard snapshots (indexed byJbUid)
    castUserGrantsjbUidCastUserGrants
    castUserShardsjbUidCastShardManifest

    dac-initializer (demo)

    regionfacadekindnotes
    productCategoriesmaster-data starterstatic@CacheSnapshot on the entity; startup: reload-if-stale, max-snapshot-age: 24h
    productsProductCachestatichand-built binding, ProductLoader.loadAll(), indexes byCode / byCategoryId
    transactionsTransactionCachetransactionalloader + writer, WRITE_BEHIND with 2 s flush, l2-ttl 30 s, negative-ttl 15 s

    Adding a region

    1. Pick a name that is unique on the backbone and stable — it is a Redis key prefix and a refresh-event target.
    2. Declare it with @CacheSnapshot or a RegionBinding; put it in a domain if another application will read it.
    3. Add a facade; give every read method a source fallback.
    4. Add the TTL / startup overrides to the chart as Octopus variables under CNH.<app>.dac.cache.….
    5. Add a row to this page.