Documentation Center

ServiceConfig

This topic describes the ServiceConfig element.

Description

Root of this configuration file.

Child element properties

Note: Child elements must occur in the order shown.

Child elements

Child elementMust occur at leastMay occur at mostElement type
DiscoveryService1 time1 timeNone
TokenService1 time1 timeNone

Attributes

AttributeDescription and useType
ConnectionTimeout

The number of milliseconds that are allowed to elapse before the client considers the Discovery Service unavailable.

(required)
number
CacheEnabled

Whether to apply caching to the connection. Defaults to false if not specified.

(optional)
Boolean
CacheExpirationDuration

The number of seconds in which the cache is considered to have expired.

(required)
number
CacheUri

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.

(optional)
string
CacheProviderClass

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.

(optional)
string
CacheClientId

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.

(optional)
string
CachePassword

The password needed to access the cache. Use this attribute if you use Redis.

string
ServiceAvailabilityCheck

Whether or not to check for the availability of the Discovery Service. Defaults to false if not specified.

(optional)
Boolean