Hi,
I have setup dispatcher on my dev and test environments in publish. I am having different problems in both the environment and hoping to get any clues from the group.
Dev:
If a document under /content is being accessed from dispatcher, i see that timestamp of .stat file gets updated however the size of the file is zero always. Does the file size of the .stat file changes at all?
Test:
If i access any URL under /content in Test environment .stat file is not getting created at all. I have tried restarting apache with no joy. It seems like nothing is being cached. I have checked dispatcher logs and requests are looking fine. Sample logs
cachefile does not exist or is a directory: /var/www/cq/abc/homepage.androidphone.v1.json
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] try to create new cachefile: /var/www/cq/abc/homepage.androidphone.v1.json
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] cache-action for [/abc/homepage.androidphone.v1.json]: CREATE
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] connected to backend rend01 (c1cmsp:4503)
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Spooling request header: Host
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Spooling request header: Accept
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Spooling request header: User-Agent
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Spooling request header: Accept-Encoding
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Spooling request header: Accept-Language
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Spooling request header: Cookie
[Thu Jul 03 16:02:14 2014] [D] [14217(139738996557792)] Detected: chunked transfer encoding
Solved! Go to Solution.
Views
Replies
Total Likes
If you want to delete the cache manually then you can write a servlet as follows and call this servlet by passing request paramenter which will contain the invalidation page path info -
String uri = "/dispatcher/invalidate.cache";
String host = "localhost";
HttpClient client = new HttpClient();
PostMethod post = new PostMethod("http://"+host+uri);
post.setRequestHeader("CQ-Action", "Activate");
post.setRequestHeader("CQ-Handle",handle);
StringRequestEntity body = new StringRequestEntity(page,null,null);
post.setRequestEntity(body);
post.setRequestHeader("Content-length", String.valueOf(body.getContentLength()));
client.executeMethod(post);
post.releaseConnection();
Do not forget to allow servlet path in dispatcher.any
Hope it helps!
Views
Replies
Total Likes
1st question, yes it is 0 kb
regarding 2nd question, please make sure that the browser does not have any authorization header, meaning if you have logged in using some credential and you are trying to open site through dispatcher in another browser tabs then cache will not work. Try to close browser and open it again.
Views
Replies
Total Likes
Sam205505050 wrote...
1st question, yes it is 0 kb
regarding 2nd question, please make sure that the browser does not have any authorization header, meaning if you have logged in using some credential and you are trying to open site through dispatcher in another browser tabs then cache will not work. Try to close browser and open it again.
Thanks for your response.
1) If the file is always 0kb then how does dispatcher identifies which pages have been modified or activated? Does it store that anywhere else?
2) I don't have any authorization headers in my request. I am just trying to access content under /content node and even for geometrixx nothing is happening. I have worked with different browser cleared the cache and stuff. I was assuming that as soon as you do the first request, CQ creates .stat file. If you accidentally delete .stat file or change the stat file level how does that affect dispatcher requests.
Views
Replies
Total Likes
1) dispatcher receives the modification/activation signal from author/publisher(depends how you have set up flush agent) instance, dispatcher removes cache from cache directory upon activation of content and update timestamp of stat file, and thereafter when again a modified page is requested then dispatcher again creates cache.
2) have you followed this - http://helpx.adobe.com/experience-manager/kb/troubleshooting-dispatcher-flushing-issues.html
Views
Replies
Total Likes
Sam205505050 wrote...
1) dispatcher receives the modification/activation signal from author/publisher(depends how you have set up flush agent) instance, dispatcher removes cache from cache directory upon activation of content and update timestamp of stat file, and thereafter when again a modified page is requested then dispatcher again creates cache.
2) have you followed this - http://helpx.adobe.com/experience-manager/kb/troubleshooting-dispatcher-flushing-issues.html
Thanks for your response.
Somebody manually deleted the dispatcher folder and since then dispatcher wasn't caching anything. I had to change the cache docroot to another directory and give permission to that and after that it started caching again. Do you know any best practice to delete cache manually. I know that we shouldn't be doing it but just in case it is required what is the best way to do that?
Views
Replies
Total Likes
Hi
You can always delete the files in the dispatcher cache manually, as long as you don't delete the docroot directory itself. I've done that many many times and it's working flawlessly. I don't know what happened in your case.
Jörg
Views
Replies
Total Likes
If you want to delete the cache manually then you can write a servlet as follows and call this servlet by passing request paramenter which will contain the invalidation page path info -
String uri = "/dispatcher/invalidate.cache";
String host = "localhost";
HttpClient client = new HttpClient();
PostMethod post = new PostMethod("http://"+host+uri);
post.setRequestHeader("CQ-Action", "Activate");
post.setRequestHeader("CQ-Handle",handle);
StringRequestEntity body = new StringRequestEntity(page,null,null);
post.setRequestEntity(body);
post.setRequestHeader("Content-length", String.valueOf(body.getContentLength()));
client.executeMethod(post);
post.releaseConnection();
Do not forget to allow servlet path in dispatcher.any
Hope it helps!
Views
Replies
Total Likes