Expand my Community achievements bar.

SOLVED

Multi-country, multi-language invalidating dispatcher cache from publisher

Avatar

Level 5

I am having issues trying to get the automatic invalidating dispatcher cache from publisher to work. Our setup is a bit complicated, we have a multi-country, multi-language site, I replaced our real domain name by sample.com:

Dispatcher (/var/www/html/content/):

  • www-sample-com
    • be-en
    • be-en.html
    • be-fr
    • be-fr.html
    • be-nl
    • be-nl.html
    • fr
    • fr.html
    • lu
    • lu.html
    • nl
    • nl.html
    • uk
    • uk.html

Here is the issues, when the publisher receives an updates and wants to invalidate the caches there is a mismatch in directory structure, example:

com.day.cq.replication.Agent.flushsample-aem-dispatcher >> Handle: /content/www-sample-com_nl/nl

As you can see it uses the livecopy name to flush the dispatcher directory structure but those don't match:

  • /content/www-sample-com_nl/nl (livecopy)
  • /content/www-sample-com/nl (dispatcher)

Is there a way to make this work? Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Level 5

We fixed this by using: Dispatcher Flush Rules from aem commons

View solution in original post

5 Replies

Avatar

Administrator

Jörg Hoh​ Your dispatcher wisdom is needed here.

~kautuk



Kautuk Sahni

Avatar

Employee Advisor

Hi,

ok, looks like that there is no direct match from your content structure do your site structure (in terms of multi-site and multi-language). Which is and will ever be a problem and one of the biggest reasons why the content structure should not evolve by accident, but should a well-thought decision considering also implications like cache invalidation.

In your case I would strongly suggest to consider if redoing the content structure might not only solve this but a bunch of other problems as well.

Of course you can avoid that, but it requires additional work (and complexity). In your case I would implement a custom invalidation script; this invalidation script can translate the repository path into cache path and then do the proper invalidation. See Configuring Dispatcher - docs.adobe.com  for the documentation of this.

Jörg

Avatar

Level 5

Hey Jörg Hoh

On the following documentation page: Configuring Dispatcher - docs.adobe.com  I found the section about 'USING CUSTOM INVALIDATION SCRIPTS'. I configured this for our setup and also used a simple logging script as shown in the example but it doesn't seem to work. What dispatcher version do you need to have '/invalidateHandler' working? We currently run a dispatcher version 4.1.10.

Thanks in advance, greetings

Jeroen

Avatar

Employee Advisor

Please update to the latest available version, IIRC it's 4.2.1 now. This feature has been introduced in the version range you are in, maybe your version is a bit too old.

Avatar

Correct answer by
Level 5

We fixed this by using: Dispatcher Flush Rules from aem commons