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.
SOLVED

What's the recommended way to make some pages cached in dispatchers only for a given period of time (e.g. 24 hours)?

Avatar

Level 7

Hi,

Is there a way to configure dispatchers to automatically invalidate all pages that match a given pattern (e.g. home.products.xml) only for 1 day in the dispatcher cache?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

But as of now there is no such configuration which can be done in dispatcher.

You can file a support ticket with Adobe for your usecase.

View solution in original post

6 Replies

Avatar

Level 2
        You can write a cron job which clears cache once a day.

Avatar

Level 2
        Not sure I understand the issue you are facing with dispatcher cron job. Do you mean that when the cron runs on dispatcher, publish might not have generated a new version of the page and dispatcher would pull the older version again?

Avatar

Level 7

That's what I am doing right now. And more or less it is okay. However when done through the dispatcher, it can make sure the latest version of the page can be retrieved from the dispatcher before deleting it and otherwise serve whatever is already cached.

Avatar

Level 7

I am referring to this section of the docs: http://docs.adobe.com/docs/en/dispatcher/disp-config.html#Automatically Invalidating Cached Files

The /invalidate property defines the documents that are automatically invalidated when content is updated.

With automatic invalidation, Dispatcher does not delete cached files after a content update, but checks their validity when they are next requested. Documents in the cache that are not auto-invalidated will remain in the cache until a content update explicitly deletes them.

Automatic invalidation is typically used for HTML pages. HTML pages often contain links to other pages, making it difficult to determine whether a content update affects a page. To make sure that all relevent pages are invalidated when content is updated, automatically invalidate all HTML pages.

Avatar

Correct answer by
Level 10

But as of now there is no such configuration which can be done in dispatcher.

You can file a support ticket with Adobe for your usecase.

Avatar

Level 10

true and hence we use the /invalidate property so that dispatcher will take care of it. but it cant be configured with a time frame as an attribute to this property