/** * Gets the default value for the period of time after which an entry in the response cache * is considered invalid. * <p> * The value is derived from the configuration properties as follows: * <ol> * <li>if the properties are of type {@link RequestResponseClientConfigProperties} * then the value of its <em>responseCacheDefaultTimeout</em> property is used</li> * <li>otherwise the {@linkplain RequestResponseClientConfigProperties#DEFAULT_RESPONSE_CACHE_TIMEOUT * default timeout value} is used</li> * </ol> * * @return The timeout period in seconds. */ protected final long getResponseCacheDefaultTimeout() { if (config instanceof RequestResponseClientConfigProperties) { return ((RequestResponseClientConfigProperties) config).getResponseCacheDefaultTimeout(); } else { return RequestResponseClientConfigProperties.DEFAULT_RESPONSE_CACHE_TIMEOUT; } }