TTenantRoutingCache.FindTenantByIdentifier Method
Returns the tenant associated with an external identifier, from the cache or from the catalog.
Remarks
The identifier-to-tenant mapping is cached for Ttl milliseconds, and unknown identifiers for NegativeTtl milliseconds. The tenant record itself comes from the tenant cache, so status changes and invalidations made through InvalidateTenant are visible through identifier lookups as well. Raises ETenantNotFound if the identifier maps to a tenant that no longer exists and ETenantCatalogUnavailable if the catalog cannot be reached.
Syntax
Unit: Aurelius.Tenancy.Cache
function TTenantRoutingCache.FindTenantByIdentifier(const Name: string; const Value: string): TTenantInfo;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | Name | string | The identifier name (for example, 'user_id'). |
| const | Value | string | The identifier value. |
Returns
The TTenantInfo of the tenant the identifier maps to, or an empty record if the identifier is not registered in the catalog.