Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

TTL for sitemap.xml

Avatar

Community Advisor

Hi All,

         I have created sitemap generation using acs common. I wanted to give the TTL for sitemap to caching.

Anyone idea how can we so it.

 

Kr,

Sanjay

13 Replies

Avatar

Community Advisor

Hi @Sanjay_Bangar, you can try to use Dispatcher TTL functionality from ASC commons. You can find more detail under https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-ttl/index.html

Avatar

Community Advisor

@Sanjay_Bangarcould you please share more details. I mean what you are expecting to happen, and what is current state. Did you observed any errors/warning in dispatcher/apache logs? How your configuration of dispatcher TTL looks like for sitemap?

Avatar

Community Advisor

Hi @lukasz-m ,

               I have added in dispatcher.any file /enable ttl and allw sitemap.xml .

Create one OSGI config in apps/config that acs common and added patterns content/guy.sitemap.xml

Expiration time:14:30

After changes in the publisher any page it is quickly reflected in the domain.sitemap.xml .

It should not displayed before the timeframe

Avatar

Community Advisor

Hi @Sanjay_Bangar, do you have your dispatcher flush agent on publish enabled? According to this docs https://helpx.adobe.com/experience-manager/kb/optimizing-the-dispatcher-cache.html#use-ttls dispatcher flush agent should be disabled on publish.

Avatar

Community Advisor

Hi,

I think it should work

filter.pattern="[/content/mysite/siterootpage.sitemap.xml]"
expires.time="14:30"



Arun Patidar

Avatar

Community Advisor

Hi @arunpatidar 

It is not working it is showing in the response header but sitemap.xml updated quickly before the time.

Example:

1.Added the configuration in acs common Max header.

2.page rename from the author and publish.

3.checked on dispatcher domain like www05-dev.numorous.org/sitemap.xml

But the page that I renamed it is reflected quickly.

 

 

 

Avatar

Community Advisor

Could you please share the response header with me for sitemap access from browser?



Arun Patidar

Avatar

Community Advisor

The header looks fine.

There might be posiiblilty that the cached sitemap is deleted/invalidated from publish content.



Arun Patidar

Avatar

Community Advisor

Okay, do you know where I can check this.it is deleted/invalidate.

Or else do I need to clear the cache.

Avatar

Community Advisor

Hi,

You can check this in local by enabling the dispatcher debug logs.

Check .statfile for the cache invalidation status.



Arun Patidar