Content Delivery client configuration reference
The Content Delivery client configuration file, cd_client_conf.xml, specifies the location of the Discovery Service and, if applicable, of the Token Service.
Overall structure of file
The file has the following basic structure:
<ServiceConfig>
<DiscoveryService/>
<TaxonomyService/>
<ContextService/>
<ContentService/>
<PreviewService/>
</ServiceConfig>
ServiceConfig root element
The root element has the following attributes:
ConnectionTimeout-
Type int Required Description and use The number of milliseconds that are allowed to elapse before the client considers the Discovery Service unavailable. CacheEnabled-
Type Boolean Required Description and use Whether to apply caching to the connection. CacheExpirationDuration-
Type int Required Description and use The number of seconds in which the cache is considered to have expired. CacheUri-
Type string Required Description and use The URI of an external Ehcache configuration file. If omitted, the client looks for a file called ehcache.xml or, if absent, failsafe-ehcache.xml. ServiceAvailabilityCheck-
Type Boolean Required Description and use Whether or not to check for the availability of the Discovery Service. Defaults to falseif not specified. CacheProviderClass-
Type string Required Description and use The fully qualified classname of the Java class that implements client-side caching. Defaults to com.sdl.web.client.cache.GeneralCacheProvider. When using Redis, set this attribute to com.sdl.web.client.cache.distributed.RedisCacheProvider. CacheConnectionTimeout-
Type string Required Description and use Cache connection timeout. Used for connections to distributed cache. CacheClientId-
Type string Required Description and use The ID with which to identify the client. Use this attribute if you use Redis, which needs a client ID to find the proper storage. CachePassword-
Type string Required Description and use The password needed to access the cache. Use this attribute if you use Redis. CacheCompressionThreshold-
Type string Required Description and use Distributed cache compression threshold option. Sets the threshold value which defines whether compression should be used for a serialized key-value pair. CacheRedisPoolMaxTotal-
Type string Required Description and use Redis maximum size of connection pool for Redis cache. CacheRedisPoolTestWhileIdle-
Type string Required Description and use Redis cache-specific option which defines whether the client should ping Redis while the client is idle. ResolveCapability-
Type string Required Description and use Specific Capability that the client will be initialized with. If no Resolve Capability is specified, the client triggers the ContentServiceCapability. ServiceProxyHostName-
Type string Required Description and use The service proxy host name ServiceProxyPort-
Type string Required Description and use The service proxy port CheckVersionCompatibility-
Type Boolean Required Description and use Whether or not to check whether the server-side microservices (CIS) have a version compatible with this client. Defaults to falseif not specified.
The root element has child elements for the individual services:
| Child element | Required? | Attributes |
|---|---|---|
DiscoveryService | ServiceUri, a string containing the URI of this service | |
TokenService | ClientId and ClientSecret, the credentials to connect to this service. ClientSecret is preferably an encrypted value. | |
ContextService | ServiceUri, a string containing the URI of this service | |
ContentService | ServiceUri, a string containing the URI of this service | |
PreviewService |
|