Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

4 Replies

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"

Avatar

Community Advisor

Hi @Arun_Patidar 

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?

Avatar

Community Advisor

The header looks fine.

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

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.