Home
6.10.4 Property
You can set optional properties on a cacheable object, such as a description of the configured servlet. The following syntax is used:
property name="key">value</property>Key is the name of the property for this cache entry element, and value is the corresponding value.
The class determines valid properties of the cache entry. Table | -3 identifies the properties that are currently defined.
Table 6-3 Cachespec.xml property definitions
Property Valid classes Value ApplicationName All Overrides the J2EEName application ID so that multiple applications can share a common cache ID namespace. EdgeCacheable Servlet True or false. The default is false. If the property is true, then the given servlet or JSP file is externally requested from an Edge Side Include processor. Whether or not the servlet or JSP file is cacheable depends on the rest of the cache specification. ExternalCache Servlet Specifies the external cache name. The external cache name needs to match the external cache group name. consume- subfragments Servlet, Web service
True or false. The default is false. When a servlet is cached, only the content of that servlet is stored, and includes placeholders for any other fragments to which it includes or forwards. Consume-subfragments (CSF) tells the cache not to stop saving content when it includes a child servlet. The parent entry, the one marked CSF, includes all the content from all fragments in its cache entry, resulting in one big cache entry that has no includes or forwards, but the content from the whole tree of entries. Consume-subfragments can save a significant amount of application server processing, but is typically only useful when the external HTTPrequest contains all the information needed to determine the entire tree of included fragments.Use the <exclude> element to tell the cache to stop consuming for the excluded fragment and instead, create a placeholder for the include or forward. For example, exclude A.jsp from the consume-subfragment,... <property name="consume-sbufragments">true<exclude>/A.jsp<exclude></property>do-not-consume Servlet, Web service
True or false. The default is false. When a fragment parent has the consume-subfragment property set to true the child fragment content is saved in the cache entry of the parent. Do-not-consume (DNC) tells the cache to stop saving the content for this fragment in the parent cache-entry and create a placeholder instead for the include or forward. do-not-cache Servlet and Portlet Defines a fragment that is neither cached nor consumed by its parent. ...
<property name="do-not-cache">true</property>
or
<cache-id>
<property name="do-not-cache">true</property>
</cache-id>
</cache-entry>
alternate_url Servlet Specifies the alternate URL that is used to invoke the servlet or JSP file. The property is valid only if the EdgeCacheable property also is set for the cache entry. persist-to-disk All True or false. The default is true. When this property is set to false, the cache entry is not written to the disk when overflow or server stopping occurs. save-attributes Servlet True or false. The default is true. When this property is set to false, the request attributes are not saved with the cache entry. Use the <exclude> element to specify the request attributes that do not apply to the save-attributes property. For example, to save only the attr1 attribute with the cache entry:
<property name="save-attributes">false<exclude>attr1</exclude></property>To save all attributes except the attr1 attribute in the cache entry, set the property to true in the preceding sample. If you do not use the <exclude> element, either all or no request attributes are saved with the cache entry.
delay-invalidations Command True or false. When this property is set to true, the commands that are invalidating cached objects based on the invalidation rules in this cache entry invalidate the cache entries after running. By default, the invalidation occurs before the command runs. store-cookies Servlet Takes one or more cookie name as its argument which is saved along with the cache object and restored by the servlet cache in the response with a set-cookie header. Save all cookies except cookie1 as part of the cache-entry...
<property name="store-cookies">true<exclude>cookie</exclude></property>Save only cookie1 as part of the cache-entry,...
<property name="store-cookies">false<exclude><cookie1</exclude></property>ignore-get-post Servlet True or false. The default is false. When the property is set to true the request type is not appended to the cache-id for GET and POST requests unless the requestType component sub-element is defined. By default the request type is automatically appended to the cache-id for GET and POST requests.