Invalidate/Set Current Cache Validity

With the futureDatedCache custom setting enabled, the batch job sets the validity of the currently active version of the cache to be until the effective time the user has selected while running the Regenerate batch job. This flexibility allows the user to avoid downtime and project the current database changes to the future date.

When the custom setting is disabled, the batch job expires the cache by setting the effectivity of the cache entry to be less than the current time.

When versioning and the futureDatedCache custom setting are enabled, the changes that impact the current cache version are cached with the time effectivity, starting with the selected date time. At run time, when the Regenerate batch job runs, there is no downtime and the current cache instance is valid until the selected date time. The future time slice start and end dates are not impacted. If the selected start date exceeds the date-time of the future time slice, then the end of the current time slice is considered as current cache effectivity.

When versioning and custom settings are disabled, the changes made in EPC that affect the currently active version of the cached entries are invalidated by setting the cache expiration time to be less than the current time. Even for the cache entries with future effectivity dates, the invalidation batch job invalidates the entries and sets the expiration time as less than the current time.