cache path

Avatar

Avatar
Validate 25
Level 3
Mahesh_Vikram
Level 3

Likes

12 likes

Total Posts

118 posts

Correct reply

3 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
Mahesh_Vikram
Level 3

Likes

12 likes

Total Posts

118 posts

Correct reply

3 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
Mahesh_Vikram
Level 3

26-01-2018

Hi All,

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.

Thanks, viki

Replies

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

26-01-2018

Hi,

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 🙂

Jörg

Avatar

Avatar
Springboard
Level 5
BrijeshYadav
Level 5

Likes

59 likes

Total Posts

102 posts

Correct reply

20 solutions
Top badges earned
Springboard
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Springboard
Level 5
BrijeshYadav
Level 5

Likes

59 likes

Total Posts

102 posts

Correct reply

20 solutions
Top badges earned
Springboard
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
BrijeshYadav
Level 5

26-01-2018

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.


/Brijesh Yadav

Avatar

Avatar
Validate 25
Level 3
Mahesh_Vikram
Level 3

Likes

12 likes

Total Posts

118 posts

Correct reply

3 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 3
Mahesh_Vikram
Level 3

Likes

12 likes

Total Posts

118 posts

Correct reply

3 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
Mahesh_Vikram
Level 3

07-02-2018

Hi Jorg/Brijesh,

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,

viki

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

07-02-2018

Thanks Joerg and Brijesh for the great community input!

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

07-02-2018

See [1] 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.

Jörg

[1] Configuring Dispatcher