Regenerate Offer Level Cache Data

The offer level batch jobs get the type of changes for a given offer, sequence those change types in a defined manner, initialize a batch job for an offer, and process the input.

For a derived offer change entry and the types of changes, the system determines if there is cache data present in the cached API response table. If the data is not present, the system operates in generate mode where it generates the cache data and caches it in the cached API response table. If cache data is present, the system operates in regenerate mode where it regenerates the cache entry and caches it in the cached API response table. In regenerate mode, the system also checks for the cached baskets that were impacted by the change and need to be regenerated. The system forms a chain of baskets and starts regenerating them. The system forms the same sequence of operations on the baskets to reach the same basket state.

With versioning enabled, the offer level regenerates batch job caters to the regeneration of specific versions of the offer according to the derived entries present in the cached API response.

If the change in the hierarchy of the offer results in an inconsistent cached time-sliced hierarchy and offer details effectivity, for example, if the version effective start and end date for a child product have been changed, then a grandchild product becomes effective. This change object for that root product now consists of the time slices that are affected. The start time of the earliest time slice and end time of the last time slice becomes the boundary cache effectivity times and hierarchy. The offer details are regenerated according to these time slices.