Expand my Community achievements bar.

SOLVED

Dispatcher not caching pages

Avatar

Level 2

I have setup dispatcher in my local but the pages I viewed are not getting cached inside htdocs.I changed docroot location to htddocs and made necessary changes in dispatcher.any file also but still not able to cache pages.

I can see the pages accessed in access.log file but under docroot the pages are not getting cached.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Switch the dispatcher log to DEBUG level, then hit a page and check the dispatcher.log.

The log will clearly tell you why your pages are not being cached (why the files are not created in that directory), I suspect you could have some permission issue with the folder where the cache files are trying to be created. 



Esteban Bustamante

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Switch the dispatcher log to DEBUG level, then hit a page and check the dispatcher.log.

The log will clearly tell you why your pages are not being cached (why the files are not created in that directory), I suspect you could have some permission issue with the folder where the cache files are trying to be created. 



Esteban Bustamante

Avatar

Level 2

I changed the log to debug log but after hitting the page nothing is showing in the debug log.

docroot folder is inside documents so it has permission to created folders and files.

Avatar

Community Advisor

Did you restart Apache after changing the log level? If you are not seeing extra information in the logs means your configuration didn't take place.d 

You should see something like this: (Be aware that the log you need to check is dispatcher.log file)

 

[Tue Oct 10 17:14:44 2017] [D] [pid 25214 (tid 139728858846976)] Found farm publishfarm for host.com
[Tue Oct 10 17:14:44 2017] [D] [pid 25214 (tid 139728858846976)] checking [/crx/de]
[Tue Oct 10 17:14:44 2017] [D] [pid 25214 (tid 139728858846976)] request URL has no extension: /crx/de
[Tue Oct 10 17:14:44 2017] [D] [pid 25214 (tid 139728858846976)] cache-action for [/crx/de]: NONE
[Tue Oct 10 17:14:44 2017] [D] [pid 25214 (tid 139728858846976)] Filter rejects: GET /crx/de HTTP/1.1
[Tue Oct 10 17:14:44 2017] [I] [pid 25214 (tid 139728858846976)] "GET /crx/de" - - 1ms [publishfarm/-]

 

For more details see; https://blogs.perficient.com/2017/10/12/mastering-aem-dispatcher-part-1-debugging-the-dispatcher/



Esteban Bustamante

Avatar

Level 2

My dispatcher.log contains as below:

 

[Wed Jun 07 13:47:56 2023] [W] [pid 22644 (tid 660)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Wed Jun 07 13:47:56 2023] [W] [pid 22644 (tid 660)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Wed Jun 07 13:47:56 2023] [W] [pid 23284 (tid 664)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Wed Jun 07 13:47:56 2023] [W] [pid 23284 (tid 664)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Thu Jun 08 10:55:46 2023] [W] [pid 29476 (tid 652)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Thu Jun 08 10:55:46 2023] [W] [pid 29476 (tid 652)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Thu Jun 08 10:55:46 2023] [W] [pid 2656 (tid 664)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.
[Thu Jun 08 10:55:46 2023] [W] [pid 2656 (tid 664)] C:\Users\keekumma\Documents\Apache Server\conf\dispatcher.any:77: Allowing requests with globs is considered unsafe. Please consult the documentation at 'https://www.adobe.com/go/docs_dispatcher_config_en' on how to use attributes method/url/query/protocol/path/selectors/extension/suffix instead.

Avatar

Level 2

After switching to debug level

 

8 11:54:26 2023] [D] [pid 29240 (tid 1028)] Request body sent to remote server
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] response.status = 200
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] response.headers[Date] = "Thu, 08 Jun 2023 06:24:26 GMT"
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] response.headers[X-Content-Type-Options] = "nosniff"
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] response.headers[Content-Type] = "application/json;charset=utf-8"
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] response.headers[ETag] = ""0fd7040952139d61cb1d3c8a8dbf3730""
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] response.headers[Content-Length] = "344"
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] Storing socket for later reuse: 127.0.0.1:4503
[Thu Jun 08 11:54:26 2023] [I] [pid 29240 (tid 1012)] "GET /content/we-retail/us/en/experience/_jcr_content/contexthub.pagedata.json" 200 344 12ms
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] Found farm website for localhost:8080
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] checking [/content/we-retail/us/en/experience/_jcr_content/contexthub.commerce.orderhistory.json]
[Thu Jun 08 11:54:26 2023] [D] [pid 29240 (tid 1012)] request contains authorization