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