Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Dispatcher cache invalidation for vanity url's

Avatar

Level 1

We are configuring dispatcher cache flush for pages with vanity url's. Pages can have multiple vanity url's in our case.

As per documentation at https://docs.adobe.com/docs/en/dispatcher/page-invalidate.html, activating a page should by default flush the content cached at it vanity path as well. But this is not happening. We are using AEM 6.1 and Dispatcher 4.1.9 on Apache 2.4.

Pls. let us know if we need to do any configuration for flushing cached content on vanity url paths.

A quick search in net showed its an issue tracked under GRANITE-9224. Can you let me know how I can access the details of this.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Refer [1] to see to configure vanity urls 

[1] https://docs.adobe.com/docs/en/dispatcher/disp-config.html

if you have already followed the same, please share your dispatcher.any file and any error if you are seeing at the activation of your page.

View solution in original post

4 Replies

Avatar

Level 1

Have attached the dispatcher.any file, activation & dispatcher log files. There is no errors in the logs.

The page is in the path /content/geometrixx1/en/vanity-test-page.html and it has a vanity url which is /test/vanity1.html

On modifying the page and activating it, accessing the page with its full path shows the updated content. Accessing the page through its vanity url shows stale content.

The only time when the vanity url shows updated content is when statfileslevel is set to 0, which flushes all cached pages on dispatcher; a behavior which we do not want. We want the statfileslevel to be set as high as possible to flush only those pages that get updated. We have currently set it to 9.

Kindly advice if we are missing anything in the configuration.

Avatar

Correct answer by
Level 10

Refer [1] to see to configure vanity urls 

[1] https://docs.adobe.com/docs/en/dispatcher/disp-config.html

if you have already followed the same, please share your dispatcher.any file and any error if you are seeing at the activation of your page.

Avatar

Level 10

If you are using the latest dispatcher version, can you configure the access to vanity URLs and see if that helps in caching the right way

https://docs.adobe.com/docs/en/dispatcher/disp-config.html#Enabling Access to Vanity URLs - /vanity_urls

Avatar

Level 1

Thanks. The above link helped in accessing vanity url without adding conditions in filter section. But what gets refreshed is just the vanity url list and not the content at each vanity path.

Our scenario is simple. We have many pages, a page can have one or more vanity paths and they are always accessed through vanity url.

We were doing some digging around, but could not find any solution which flushes the cache of only the activated page at their vanity paths.

Only way to achieve this through OOB configuration seems to be to set statfilelevel to 0 and invalidate all cache on any page activation. This would be inefficient in our case. 

We are thinking of implementing a custom flush agent. Would that be the only way to achieve this.

Any pointers / references to custom flush agent code would help.