DataClientConfiguration¶
Concrete, mutable implementation of IDataClientConfiguration with sensible defaults for caching: caching enabled, a default policy key of data-client-cache-policy, and a 30-second maximum cache duration. It is the configuration object passed into the primary HttpClientBase-derived constructors, and is also constructed internally by the obsolete HttpClientBase constructor overload (with UseCache forced to false).
Purpose¶
- Supplies default values for system identity and caching settings so callers need only override what differs from the defaults (for example
SystemType). - Acts as the plain-old-CLR-object configuration payload consumed by
HttpClientBaseand its subclasses.
Context¶
- Namespace:
SAIF.Data.Guidewire.Clients - Assembly/package:
SAIF.Data.Guidewire(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| SystemType | public SystemType SystemType { get; set; } |
Identifies the calling system's type; no default value, defaults to the type's default (SystemType default enum value) |
| SystemName | public string SystemName { get; set; } |
Optional system name; null by default, meaning HttpClientBase uses SystemHashUtil.Get(SystemType) rather than a name-based hash |
| UseCache | public bool UseCache { get; set; } = true |
Defaults to true, enabling response caching per SDG-BR-003 |
| CachePolicyKey | public string CachePolicyKey { get; set; } = "data-client-cache-policy" |
Default Polly policy registry key used to resolve the caching policy |
| MaxCacheDuration | public TimeSpan MaxCacheDuration { get; set; } = TimeSpan.FromSeconds(30) |
Default maximum cache duration of 30 seconds |
Behavioral notes¶
- The obsolete
HttpClientBaseconstructor overload constructs aDataClientConfigurationinternally withUseCache = false, overriding the class's own default oftrue.
Constraints and usage notes¶
- All properties are mutable (
get; set;), so callers can freely override any default before passing the instance to a client constructor. - Enforcement of
MaxCacheDurationdepends entirely on how the Polly policy registered underCachePolicyKeyis configured by the consuming application*; this class only stores the value.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Data/SAIF.Data.Guidewire/Clients/DataClientConfiguration.csData/SAIF.Data.Guidewire/Clients/HttpClientBase.cs