Setting up command caching for catalog filter

If your site uses catalog filters, you can set up command caching for catalog filter to help improve site performance.

Cacheable commands can eliminate much of the processor usage that is associated with running redundant database queries. Command Caching eliminates this usage by storing the results from earlier queries in a cache. With the WebSphere Commerce search feature enabled, catalog filter commands can compose search expressions to perform entitlement for users under different trading agreements. By adding command caching for catalog filters, the filtering search expression can be retrieved from the cache entry instead of from the database. This cache entry retrieval can improve response time and reduce system load.

Before you begin

Ensure that you are familiar with and understand the methods that are used to generate a key that is described in the following topic:

About this task

When you set up caching for catalog filter, you can add cache entries for the following catalog filter-related commands:
ResolveCatalogFilterSolrExpressionCmdImpl
This command accelerates the catalog filter-related entitlement check procedure. If your site uses WebSphere Commerce search and the Management Center catalog filter functionality, caching entries for this command can improve search performance. Caching entries for this command can also improve add to cart performance that performs entitlement checks before the process adds a product to a shopping cart.
ScheduledCatalogFilterImportCmdImpl
This command is a schedule command to import catalog filters with the Catalog Filter and Pricing tool or the Data Load utility. This command is triggered if your site imports catalog filter data into Management Center. The caching entry for this command is used to declare invalidation against catalog filters that are imported into Management Center with the Data Load utility or the Catalog Filter and Pricing tool. With this declaration all the cache entries for catalog filter commands are invalidated.
CalculateProductSetEntitlementCmdImpl
This command accelerates calculating entitlement check for product sets. Caching entries for this command can improve performance if your site uses WebSphere Commerce Accelerator product set based catalog filtering and not Management Center catalog filtering.

Procedure

  1. Open the sample cache configuration file cachespec.xml in the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir/samples/dynacache/Contract
    • WC_installdir/samples/dynacache/Contract
  2. Copy all the cache entries from this sample cache configuration file.
  3. Open the cachespec.xml file that is found in the following directory:
    • WebSphere Commerce DeveloperWCDE_installdir/workspace/Stores/WebContent/WEB-INF/
    • WC_eardir/Stores.war/WEB-INF/
  4. Paste the cache entries from the sample cache configuration file to this cachespec.xml file.
  5. Save and close the cachespec.xml file.