Adding sample invalidation policies to your store's cachespec.xml file
You can add invalidation policies that are provided in the sample invalidation files to your store.
Procedure
-
Open the sample invalidation
cachespec.xml
file. The sample invalidation cachespec.xml files are located in the following directory:- WC_installdir/samples/dynacache/invalidation
- WCDE_installdir/samples/dynacache/invalidation
Note: In the development environment, servlet caching is disabled. To use sample invalidation policies, servlet caching must be enabled. To enable and use servlet caching, see the Configuring servlet caching topics. - Copy the invalidation policies from the sample invalidation file to the cachespec.xml file for your store. Place the invalidation policies at the end of your store's cachespec.xml file after the last element before the tag.
- Ensure the invalidation IDs match the corresponding dependency IDs in the caching policies. If a matching dependency ID does not exist, then the invalidation policies are not run and you must change either the ID of the invalidation rule or the ID of the dependency-id rule so that they match. Your store might have more or different business requirements that require you to add extra invalidation policies and dependency IDs. For more information, see Defining the invalidation policies in cachespec.xml.
- If necessary, change the name and directory of JSP files in the sections that are copied from the sample invalidation files to match the information in the rest of your store's cachespec.xml file.
-
Save the file to the following directory:
- WC_eardir/Stores.war/WEB-INF
- WCDE_installdir/workspace/Stores/WebContent/WEB-INF