Dynamic cache invalidation for prices generated by price rules
Dynamic cache invalidation ensures that the prices customers see on the storefront reflect any changes business users make to price rules, price equations, price constants, and price rule assignments.
On a WebSphere Commerce store that has dynamic caching enabled, all JSP pages and servlets with cache entry definitions in the store's cachespec.xml file are cached. This can include pages that display prices generated from price rules. If a price calculated from a price rule is displayed on a cached JSP page or servlet, and if a business user then makes changes related to the price rule, the price is not recalculated unless the cache is invalidated.
- Changes to price rules.
- Changes to price equations used in a price rules.
- Changes to price constants used in a price rules. This includes constants that are used indirectly in price rules through a price equation.
- Changes to contracts that involve assigning or removing a price rule.
To support cache invalidation for these scenarios, WebSphere Commerce uses command-based invalidation. A sample cachespec.xml containing a set of invalidation rules is provided at the following path:
- WC_installdir\samples\dynacache\invalidation\pricerule\cachespec.xml