3

I have a component that is cacheable within a placeholder where another component is placed, which is an SXA component. When I try to remove the SXA component inside the placeholder, the cache doesn't seem to clear.

For clarity:

I have a Menu component with a placeholder where i can place an Sxa Language Selector

The Menu component has cache and the cache clears when I publish some change to the menu, but when I remove the language selector from Menu the same doesn't happen, the language selector is still there on the CD server.

These components are inserted in the page through a page design.

But when I insert these components in the presentation details of the page, everything works as expected.

My instance is 9.0 update 1 with SXA 1.6 with CM and CD server and its multi-site

And I added this patch

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
    <events>
        <event name="indexing:end">             
        <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
                <sites hint="list">
                    <site>website</site>
                    <site>Site</site>
                </sites>
            </handler>
        </event>            
        <event name="indexing:end:remote">              
        <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
                <sites hint="list">
                    <site>website</site>
                    <site>Site</site>
                </sites>
            </handler>
        </event>
    </events>
</sitecore>

One more thing my cache setting include the menu rendering and the SXA language selector.

enter image description here

2

I recently had a similar issue. Here is what I determined:

  • If I went to /sitecore/admin/cache.aspx and cleared the cache manually, everything was fine.

  • I determined that the Cache that was actually holding the Partial Design cache is the SXA[CompositesXml]

  • I then noticed that there is a Sitecore.XA.Feature.Composites.EventHandlers.CompositesXmlCacheClearer processor in the publish:end event.
  • After digging into that code, it seems that the SXA[CompositesXml] cache is only cleared if the partial design inherits from one of these templates:

    • /sitecore/templates/Feature/Experience Accelerator/Composites/Datasource/Composite Section
    • /sitecore/templates/Feature/Experience Accelerator/Composites/Datasource/Composite Group
    • /sitecore/templates/Foundation/Experience Accelerator/Multisite/Content/Page

To resolve the issue, I inherited my Partial Design template from the Page template above. Then after publishing the partial design, the cache was properly cleared and the content was updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.