Refresh Element
A refresh element contains information on how cache data is to be refreshed or a trigger is to be updated. For some operations, this element contains mode and schedule only.
• mode: How the data, cache, or trigger should be refreshed: MANUAL or SCHEDULED.
• expirationPeriod (optional): The number of milliseconds after which the cache is cleared when it has been refreshed. If zero, the cache never expires.
• firstRefreshCallback (optional): An optional path pointing to a procedure with zero input elements that should be invoked before the cache refresh.
• secondRefreshCallback (optional): An optional path pointing to a procedure with zero input elements that should be invoked after a successful or failed cache refresh.
• clearRule: NONE, ON_LOAD, or ON_FAILURE.
The normal behavior is that old cache data is cleared on expiration, or when a cache refresh successfully completes and the old cache data is replaced by the new cache data. If no clearRule is provided, the enable setting is left unaltered.
— If NONE, just the normal behavior occurs.
— If ON_LOAD, the normal behavior occurs, but the old cache data is immediately cleared as the refresh is started.
— If ON_FAILURE, the normal behavior occurs, and the old cache data is cleared if the refresh fails.