Custom request attributes for servlet caching

We can create custom request attributes for servlet caching by adding them to the <map> tag.

In a store that runs in the Transaction server, the DynaCacheFilterMappings component tag in the wc-server.xml file has a property that defines several <map> tags.

In a store that runs in the Store server, set this configuration in the workspace_dir/xml/config/wc-store.xml file. Each <map> tag defines how a request attribute can be added to the HttpServletRequest object. Each <map> tag can specify the following attributes:

We can call the MyClass.getMyAttributeValue method on each request to generate an attribute value for a request attribute named "MyAttribute", which is then added to the request object. To call this method on each request, specify the following <map> tag: