HCL Commerce Version 9.1.8.0

Troubleshooting: Live store does not show SKU price index updates

On a Live storefront, cached pages do not update in the storefront after changing a product SKU price and reindexing, even though the REST API shows that they have changed.

Problem

A particular set of circumstances can lead to a caching issue with the Live storefront:
  1. You or a customer has browsed a set of Live storefront pages. This results in these pages being cached for future use.
  2. You change the product SKU price of such cached pages as a workspace task under the Quick Publish task group in the Management Center.
  3. The store preview shows that the pages have been properly updated to show the new price. So does the REST API call, eg.,
    http://server-address:server-port/search/resources/store/1/productview/byId/yourproductId
    where server-address:server-port is the URL for your search server, and yourproductIdis the numerical identifier for the product.
  4. In the Live storefront, browse to the product display page for yourproductId. The old (cached) SKU price information is still displayed.

Cause

By default NiFi is configured with an invalidation processor that sends invalidation request to the cache for items that have been changed. Not all stores use the same dependency IDs to trigger invalidation, however. This can result in an incoming invalidation message not matching with any expected ID within a given store. Such mismatched invalidation requests are lost.

Solution

You can use the Ingest update API to specify that dependency IDs must be sent with a certain format, and with certain values. Doing this requires two calls to the update API.

  1. Call to change the dependency format and values of Push-to-Live.
    PUT http://Ingest_Host:Ingest_Port/connectors
    BODY
    {
        "name": "push-to-live",
        "pipes": [
            {
                "name": "WorkspacePublishing",
                "label": "Workspace Fine Grain Invalidations",
                "properties": [
                    {
                        "name": "properties.Product Invalidation Template",
                        "value": "storeId:partNumber:{supportedStoreId}:{productPartNumber};storeId:partNumber:{supportedStoreId}:{partNumber};storeId:categoryId:{supportedStoreId}:{parentCategoryId}",
                        "scope": {
                            "name": "Workspace Publishing Invalidations.WorkspacePublishInvalidation",
                            "type": "PROCESSOR"
                        }
                    }
                ]
            }
        ]
    }
    
  2. Call to change the dependency format and values of quick publish.
    PUT http://Ingest_Host:Ingest_Port/connectors
    BODY
    {
        "name": "auth.publish",
        "pipes": [
            {
                "name": "PublishWorkspaceChange",
                "label": "Workspace Approval",
                "properties": [
                    {
                        "name": "properties.Product Invalidation Template",
                        "value": "storeId:partNumber:{supportedStoreId}:{productPartNumber};storeId:partNumber:{supportedStoreId}:{partNumber};storeId:categoryId:{supportedStoreId}:{parentCategoryId}",
                        "scope": {
                            "name": "Workspace Publishing Invalidations.WorkspacePublishInvalidation",
                            "type": "PROCESSOR"
                        }
                    }
                ]
            }
        ]
    }
    

With this change to the template, invalidation requests after SKU price changes will now be recognized and executed by all storefronts.