Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Dispatcher Cache Root in Local

Avatar

Level 4

I am running the dispatcher using docker on my local Windows machine. Can anyone tell me where can I find the cache folder? I need to change some cache rules and check whether it is being applied successfully or not. 

Also how to change this cache root in local ?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Finally, I have found the answer to this question. 

 

I checked for the volume mappings for my running Docker container using this command 

docker inspect <container_id>

In the output you should see a "Mounts" section which looks something like this :

"Mounts": [
{
"Type": "bind",
"Source": "C:\\Users\\myUser\\Files\\AEMMainInstance\\dispatcher\\bin\\..\\lib",
"Destination": "/usr/lib/dispatcher-sdk",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},{
"Type": "bind",
"Source": "C:\\Users\\myUser\\Files\\AEMMainInstance\\dispatcher\\src",
"Destination": "/mnt/dev/src",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},

]

 

There was no "mount" defined for the path "/mnt/var/www/html" which is the path to my docroot. So, I changed the docer_run.cmd script to add a new mount to specify the mapping for "/mnt/var/www/html". 

 

Add this line in your docker_run.cmd and it will add the mount for you.

set volumes=-v C:\Users\yourUser\Files\AEMMainInstance\dispatcher\cache:/mnt/var/www/html:rw !volumes!
 
Restart your docker and try to hit a page from your dispatcher. And you check your local directory that you used for mapping to see how the caching is happening.
 
Ankan_Ghosh_0-1716536886356.png

 

 

View solution in original post

14 Replies

Avatar

Community Advisor

@Ankan_Ghosh 

 

 

  • Cache :
    • defined by: /docroot property in farm file
    • default location for AEMaaCS SDK’s docker image: /mnt/var/www/html

 

The following blog covers multiple important aspects around dispatcher set-up via docker

https://techrevel.blog/2023/08/28/navigating-aem-dispatcher-setup-farm-file-resolution-and-variable-...


Aanchal Sikka

Avatar

Level 4

Thanks for the reply. But where is this mnt/var/www/html being created in the local directory?

How do I check the files that are cached? 

Avatar

Community Advisor

@Ankan_Ghosh 

 

Option-1:

I don't have a docker locally, so sharing the screenshots from internet.

- Go to Images

- Click on the vertical ellipses corresponding to your image. 

- Select "Open in terminal". You should be able to access logs at /mnt/var/www/html 

aanchalsikka_0-1711632387861.png

 

 

Option-2: To access via power shell.

https://www.youtube.com/watch?v=o5ycGE2bGIg

 

 


Aanchal Sikka

Avatar

Level 4

Tried to access the file from the terminal but seems like nothing is in it

Ankan_Ghosh_0-1711640736203.png

Please correct me if I am doing anything wrong.

Avatar

Community Advisor

@Ankan_Ghosh 

- Please check the /docroot value defined in farm file.

- PLease enable debug mode in the logs and check the cache logs

Define DISP_LOG_LEVEL debug

 

How a detailed cache log should look like is available here: Deep-dive into AEM dispatcher’s cache flush strategies – Adobe Experience Manager Blog (techrevel.bl...

 


Aanchal Sikka

Avatar

Level 1

Hey @Ankan_Ghosh,

Getting the same problem.

aashishdimri2002_0-1715170513701.png

 

Do you have any solution for the problem 

Avatar

Community Advisor

Hi @Ankan_Ghosh 
It will be inside the dispatcher sdk folder, if you are using AEM as a cloud SDK

Screenshot 2024-03-28 at 14.23.32.png

 

 

 



Arun Patidar

Avatar

Level 4

I am on a Windows Machine and the cache folder is not being generated inside the Dispatcher Folder. Content is being served but I am not able to see how things are being cached. My main motive is to understand how things are cached and in what order. 

Ankan_Ghosh_1-1711640250873.png

 

Avatar

Community Advisor

Hi @Ankan_Ghosh 
Maybe the cache is not working as expected, please check your configurations.
As @aanchal-sikka  mentioned, you would be able to see the cache from terminal which opens within container.



Arun Patidar

Avatar

Level 1

Hi @Ankan_Ghosh Were you able to resolve the issue, as I am also facing the same issue?

Avatar

Correct answer by
Level 4

Finally, I have found the answer to this question. 

 

I checked for the volume mappings for my running Docker container using this command 

docker inspect <container_id>

In the output you should see a "Mounts" section which looks something like this :

"Mounts": [
{
"Type": "bind",
"Source": "C:\\Users\\myUser\\Files\\AEMMainInstance\\dispatcher\\bin\\..\\lib",
"Destination": "/usr/lib/dispatcher-sdk",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},{
"Type": "bind",
"Source": "C:\\Users\\myUser\\Files\\AEMMainInstance\\dispatcher\\src",
"Destination": "/mnt/dev/src",
"Mode": "ro",
"RW": false,
"Propagation": "rprivate"
},

]

 

There was no "mount" defined for the path "/mnt/var/www/html" which is the path to my docroot. So, I changed the docer_run.cmd script to add a new mount to specify the mapping for "/mnt/var/www/html". 

 

Add this line in your docker_run.cmd and it will add the mount for you.

set volumes=-v C:\Users\yourUser\Files\AEMMainInstance\dispatcher\cache:/mnt/var/www/html:rw !volumes!
 
Restart your docker and try to hit a page from your dispatcher. And you check your local directory that you used for mapping to see how the caching is happening.
 
Ankan_Ghosh_0-1716536886356.png