Home


TopCategoriesDisplay

Following the StoreCatalogDisplay is the next cache-id entry for the TopCategoriesDisplay page.

<cache-id>
    <component id="" type="pathinfo">
        <required>true</required>
        <value>/TopCategoriesDisplay</value>
    </component>
    <component id="storeId" type="parameter">
        <required>true</required>
    </component>
    <component id="catalogId" type="parameter">
        <required>true</required>
    </component>
    <component id="categoryId" type="parameter">
        <required>false</required>
    </component>
    <component id="DynaCache" type="attribute">
        <required>true</required>
    </component>
    <component id="DC_curr" type="attribute">
        <required>true</required>
    </component>
    <component id="DC_cont" type="attribute">
        <required>true</required>
    </component>
    <component id="DC_mg" type="attribute">
        <required>true</required>
    </component>

</cache-id>

The elements in this entry are very similar to the StoreCatalogDisplay entry. The URL this cache ID executes against looks like: /TopCategoriesDisplay?storeId=<storeId>&catalogId=<catalogId>

Notice that the categoryId parameter did not appear in this URL. This is because categoryId is declared optional in the cachespec (see Example | -17). CategoryId is not required to be present for the rule to fire because its <required> property is set to false. If the categoryId were present in the request URL, then a different cache-id is generated because the DynaCache internal id-generator class would then include the value of the categoryId parameter when generating the unique cache ID.

+

Search Tips   |   Advanced Search