// Create the default CacheControlBuilder.
PolicyFactory factory = PolicyFactory.getDefaultInstance();
CacheControl baseCacheControl = base.getDefaultCacheControl();
CacheControlBuilder builder = factory.createCacheControlBuilder();
builder.setCacheThisPolicy(getBoolean(
configuration.getDefaultCacheThisPolicy(),
baseCacheControl.getCacheThisPolicy()));
builder.setRetainDuringRetry(getBoolean(
configuration.getDefaultRetainDuringRetry(),
baseCacheControl.getRetainDuringRetry()));
builder.setRetryFailedRetrieval(getBoolean(
configuration.getDefaultRetryFailedRetrieval(),
baseCacheControl.getRetryFailedRetrieval()));
builder.setRetryInterval(getInteger(
configuration.getDefaultRetryInterval(),
baseCacheControl.getRetryInterval()));
builder.setRetryMaxCount(getInteger(
configuration.getDefaultRetryMaxCount(),
baseCacheControl.getRetryMaxCount()));
builder.setTimeToLive(getInteger(configuration.getDefaultTimeToLive(),
baseCacheControl.getTimeToLive()));
// Force the defaults to adhere to restrictions.
applyConstraints(builder);
// Force the builder to create the cache control so that it can be
// accessed concurrently.
this.defaultCacheControl = builder.getCacheControl();
// At the moment the derived constraints default to using the current
// value of these constraints.
defaultAllowCacheThisPolicy = allowCacheThisPolicy;
defaultAllowRetainDuringRetry = allowRetainDuringRetry;