Package Replication does not clearing the dispatcher cache for its filters.

Avatar

Avatar

VitthalaShiva

Avatar

VitthalaShiva

VitthalaShiva

04-09-2018

I have set up the dispatcher with Publish Instance and publishing a page from Author to Publish is clearing clearing the cached page on dispatcher, but if I am activating any package from author to publish does not clear its filters from the dispatcher cache. i.e. I have a package with the filter "/etc/designs/PROJECT_NAME/site/example.js, and the same file is cached on at the dispatcher. If I am replicating a package from the Author, then in Dispatcher log, I am able to see

[DATE_TIME] [I] [pid 8240 (tid 640)] Activation detected: action=Activate [/etc/packages/PROJECT_NAME/BUNDLE_NAME-1.0.76.zip]

[DATE_TIME] [I] [pid 8240 (tid 640)] Touched c:\Apache2\htdocs\.stat.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

05-09-2018

if you encounter this issue only when deploying the JS and CSS package, I would recommend to use versioned clientlibs. Because then it doesn't matter if the dispatcher is invalidated or not; as soon as new JS or CSS files are dropped on publish, the URL to the clientlibs will change (different selector). And then the old files are no longer referenced and used. Then the only remaining task is to clean up the directory on the dispatcher every once in a while to reclaim disk space.

Jörg

Answers (4)

Answers (4)

Avatar

Avatar

Nisha_Nivedita

Employee

Avatar

Nisha_Nivedita

Employee

Nisha_Nivedita
Employee

05-09-2018

I see that you mention stat file is touched, if thats the case is the etc/design..* filter  getting invalidated on accessing it on publisher.Also how does your invalidate section look like , can you paste here?

Having said so, agree with Jörg code/templates should be a part of build process not activating as packages.

Avatar

Avatar

Jitendra_S_Toma

Avatar

Jitendra_S_Toma

Jitendra_S_Toma

05-09-2018

Hi,

it is a problematic if package invalidate pages however May I know what is your use case? And what is the need for that?

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

05-09-2018

When you activate packages, the publish does not send invalidation requests for the content of the package. That's default behavior.

(Anyway, activating deployment packages via replication is hardly best practice, because you cannot control the order. Typically it will cause a restart of bundles on all publishs at the same time, causing iussues with the availability of your site(s).)

Jörg

Avatar

Avatar

VitthalaShiva

Avatar

VitthalaShiva

VitthalaShiva

05-09-2018

Hi All,

The use case is, we have near to 10 publish instances and I was thinking to upload the packages only to the author instance and replicate the same, so our UI (css and JS for the end user) has a different package, so that doubt is if we are replicating the UI package from author to publish instance, does AEM publish instance triggers the dispatcher flush for the UI package filters to clear the JS and CSS cache.

Our JS and CSS is under /etc/designs/PROJECT_NAME.