Documentation Center

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
Typeint
Requiredyes
Description and useThe number of milliseconds that are allowed to elapse before the client considers the Discovery Service unavailable.
CacheEnabled
TypeBoolean
Requiredyes
Description and useWhether to apply caching to the connection.
CacheExpirationDuration
Typeint
Requiredyes
Description and useThe number of seconds in which the cache is considered to have expired.
CacheUri
Typestring
Requiredno
Description and useThe 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
TypeBoolean
Requiredno
Description and useWhether or not to check for the availability of the Discovery Service. Defaults to false if not specified.
CacheProviderClass
Typestring
Requiredno
Description and useThe 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
Typestring
Requiredno
Description and useCache connection timeout. Used for connections to distributed cache.
CacheClientId
Typestring
Requiredno
Description and useThe 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
Typestring
Requiredno
Description and useThe password needed to access the cache. Use this attribute if you use Redis.
CacheCompressionThreshold
Typestring
Requiredno
Description and useDistributed cache compression threshold option. Sets the threshold value which defines whether compression should be used for a serialized key-value pair.
CacheRedisPoolMaxTotal
Typestring
Requiredno
Description and useRedis maximum size of connection pool for Redis cache.
CacheRedisPoolTestWhileIdle
Typestring
Requiredno
Description and useRedis cache-specific option which defines whether the client should ping Redis while the client is idle.
ResolveCapability
Typestring
Requiredno
Description and useSpecific Capability that the client will be initialized with. If no Resolve Capability is specified, the client triggers the ContentServiceCapability.
ServiceProxyHostName
Typestring
Requiredno
Description and useThe service proxy host name
ServiceProxyPort
Typestring
Requiredno
Description and useThe service proxy port
CheckVersionCompatibility
TypeBoolean
Requiredno
Description and useWhether or not to check whether the server-side microservices (CIS) have a version compatible with this client. Defaults to false if not specified.
The root element has child elements for the individual services:
Child elementRequired?Attributes
DiscoveryServiceyesServiceUri, a string containing the URI of this service
TokenServiceyesClientId and ClientSecret, the credentials to connect to this service. ClientSecret is preferably an encrypted value.
ContextServicenoServiceUri, a string containing the URI of this service
ContentServicenoServiceUri, a string containing the URI of this service
PreviewServiceno
  • ServiceUri, a string containing the URI of this service
  • MachineName, a string containing the machine name
  • FileLocation, a string containing the storage location to use for file system-based operations
  • DefaultFileSystem, a Boolean that specifies if the file structure of the file system storage is the default one