what if i have different Document Root path in httpd.conf and docroot in dispatcher.any, does it cause any issue.
I am able to see cache is getting created under cache path.
the whole webserver+dispatcher setup has 2 "active" parts:
* the dispatcher fetches the content from the render (=AEM) and stores it on disk
* the webserver handles incoming requests and serves the response from disk.
So both parts need to agree on the location where the files are stored. That means that both in the dispatcher configuration and in the httpd webserver configuration the location of the cache must be specified. And of course these paths should be identical 🙂
Yes it will be a problem,
As recommended that the cacheroot(doc root ) must be equal to the document root of the web-server.
Document Root path in httpd.conf is the directory out of which you will serve your documents. By default, all requests are taken from this directory.
and docroot in dispatcher.any is the path where cache gets created.
So even though you find that cache gets created under doc root but page request will not serve cached documents because web server tries to find all cached document under document root and if not found then send request to server.
Thanks for your Inputs.
As I used the same configuration in my previous project, when there was difference in path we faced caching issues, like cache is not getting formed.
In my current project.
Document Root path in httpd.conf and docroot in dispatcher.any are different. But I did not observe any caching issues in such we are live now, may be we have less pages served from AEM.
Any strong statement with which I can go to my client and tell him. Cache path's should be identical.
Thanks Joerg and Brijesh for the great community input!
See  for this statement (regarding the /docroot config parameter of the dispatcher):
The value must be the exact same path as the document root of the web server so that Dispatcher and the web server handle the same files.
The web server is responsible for delivering the correct status code when the dispatcher cache file is used, that's why it is important that it can find it as well.
That is part of the official documentation.