Overview of CommerceCache Operation Sequences

In Microsoft Commerce Server 2009 R2, the CacheRefreshProcessor sequence component allows you to perform the following operations:

  • Request a cache refresh (see About the CommerceCache Update Operation)

  • Query for pending cache refresh requests (see About the CommerceCache Query Operation)

  • Clear caches (see About the CommerceCache Delete Operation)

About the CommerceCache Update Operation

When a business user requests a refresh of a cache through the Desktop Business Tools or the Commerce Server Business Administration Ribbon, the CommerceUpdateOperation_CommerceCache message handler is called to register the cache refresh request with the Commerce Foundation.

Only authorized business users can request to refresh a cache. You must define the authorized identities in the CommerceEntityAuthorizationStore.xml file using the Authorization Manager (AzMan). For more information, see Configuring Authorization Security for the CommerceCache Entity.

The message handler for the CommerceCache update operation is shown in the following example:

<MessageHandler name="CommerceUpdateOperation_CommerceCache"
                    responseType="Microsoft.Commerce.CommerceUpdateOperationResponse, Microsoft.Commerce, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
        <OperationSequence>
          <Component name="Authorization" type="Microsoft.Commerce.SequenceComponents.Components.AuthorizationSequenceComponent, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
          <Component name="Update pending refresh requests" type="Microsoft.Commerce.SequenceComponents.Components.CacheRefreshProcessor, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
        </OperationSequence>
      </MessageHandler>

About the CommerceCache Query Operation

The CommerceQueryOperation_CommerceCache message handler allows the Commerce Foundation operation service to detect pending cache refresh requests.

Only an authorized application pool identity for the Web application (in two-tier and three-tier deployment topologies) or a Commerce Foundation operation service (in a three-tier deployment) can query for pending cache refresh requests. You must define the authorized identities in the CommerceEntityAuthorizationStore.xml file using Authorization Manager (AzMan). For more information, see Configuring Authorization Security for the CommerceCache Entity.

<MessageHandler name="CommerceQueryOperation_CommerceCache"
                    responseType="Microsoft.Commerce.CommerceQueryOperationResponse, Microsoft.Commerce, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
        <OperationSequence>
          <Component name="Authorization" type="Microsoft.Commerce.SequenceComponents.Components.AuthorizationSequenceComponent, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
          <Component name="Query pending refresh requests" type="Microsoft.Commerce.SequenceComponents.Components.CacheRefreshProcessor, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
        </OperationSequence>
      </MessageHandler>

About the CommerceCache Delete Operation

The CommerceDeleteOperation_CommerceCache message handler allows the Commerce Foundation operation service to clear all the information in the specified cache; subsequent data requests to the Commerce Foundation refill the cache with the latest information from the database.

Only an authorized application pool identity for the Web application (in a two-tier deployment) or Commerce Foundation operation service (in a three-tier deployment) can clear caches. You must define the authorized identities in the CommerceEntityAuthorizationStore.xml file using Authorization Manager (AzMan). For more information, see Configuring Authorization Security for the CommerceCache Entity.

The CommerceDeleteOperation_CommerceCache message handler can be configured to specify the list of Marketing Cache names. Default Marketing Cache names are "Advertising" and "Discounts".

      <MessageHandler name="CommerceDeleteOperation_CommerceCache"
                     responseType="Microsoft.Commerce.CommerceDeleteOperationResponse, Microsoft.Commerce, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
        <OperationSequence>
          <Component name="Authorization" type="Microsoft.Commerce.SequenceComponents.Components.AuthorizationSequenceComponent, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>
          <Component name="Refresh Commerce Cache" type="Microsoft.Commerce.SequenceComponents.Components.CacheRefreshProcessor, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" >
            <Configuration
             customElementName="MarketingCacheNames"
             customElementType="Microsoft.Commerce.SequenceComponents.Components.CacheRefreshElementCollection, Microsoft.Commerce.SequenceComponents, Version=9.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35">
              <MarketingCacheNames>
                <add name="Advertising" />
                <add name="Discounts" />
              </MarketingCacheNames>
            </Configuration>
          </Component>
        </OperationSequence>
      </MessageHandler>

See Also

Other Resources

Working with Cache Refresh (Pull or Polling Model)

About the CommerceCache Entity

Using APIs to Manage Commerce Server Caches

Configuring Authorization Security for the CommerceCache Entity

Creating an HTTP Module for Presentation Tier Polling

Modifying the Cache Refresh Configuration