Add sample invalidation policies to your store's cachespec.xml file

You can add invalidation policies provided in the sample invalidation files to your store.

  1. Open sample invalidation cachespec.xml file. The sample invalidation cachespec.xml files are located in the following directory:

  2. Copy the invalidation policies from the sample invalidation file to the cachespec.xml file for your store. You can place the invalidation policies at the end of your store's cachespec.xml file after the last element before the tag.

  3. Ensure the invalidation IDs match the corresponding dependency IDs in the caching policies. If a matching dependency IDs does not exist, then the invalidation policies will not be executed and you should change either the ID of the invalidation rule or the ID of the dependency-id rule so that they match. Your store might have additional or different business requirements that require you to add additional invalidation policies and dependency IDs. For more information see Defining the invalidation policies in cachespec.xml in the WAS Information Center.

  4. If necessary, change the name and directory of JSP files in the sections copied from the sample invalidation files to match the information in the rest of your store's cachespec.xml file.

  5. Save the file located to the directory: WC_eardir/Stores.war/WEB-INF

 

Related tasks


Create store pages that can be cached using cachespec.xml
Define the invalidation policies in cachespec.xml
Tutorial: Invalidating cache

 

Related Reference


Caching defaults