I have followed the instructions described in http://dev.day.com/docs/en/cq/5-5/deploying/dispatcher/page_invalidate .html to manually delete and re-cache files. However, I found that I can only delete cache files but not to re-cache files immediately.
Below is the code I used to perform the test:
HttpClient client = new HttpClient();
PostMethod post = new PostMethod("http://localhost/dispatcher/invalidate.cache");
post.setRequestHeader("CQ-Action", "Activate");
post.setRequestHeader("CQ-Handle", "/content/geometrixx/en" );
StringRequestEntity body = new StringRequestEntity( "/content/geometrixx/en.html" , null, null);
post.setRequestEntity(body);
post.setRequestHeader("Content-length",String.valueOf(body.getContent Length()));
client.executeMethod(post);
post.releaseConnection();
After the code is run, I found that cache files in Dispatcher are removed, but they have not been re-created. Below is the captured from dispatcher log:
[Sun May 26 14:00:28 2013] [D] [2488(1372)] Found farm website for localhost
[Sun May 26 14:00:28 2013] [D] [2488(1372)] checking [/dispatcher/invalidate.cache]
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Activation detected: action=Activate [/content/geometrixx/en]
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Touched \opt\communique\dispatcher\cache\.stat
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en.html
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en.topnav.1369537 660795.html
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en\_jcr_content\p ar\image.img.jpg\1368263491134.jpg
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en\_jcr_content\p ar\image.img.jpg
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en\_jcr_content\p ar\image_0.img.jpg\1368263491152.jpg
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en\_jcr_content\p ar\image_0.img.jpg
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en\_jcr_content\p ar
[Sun May 26 14:00:28 2013] [I] [2488(1372)] Evicted \opt\communique\dispatcher\cache\content\geometrixx\en\_jcr_content
[Sun May 26 14:00:28 2013] [D] [2488(1372)] response.headers[Server] = "Communique/2.6.3 (build 5221)"
[Sun May 26 14:00:28 2013] [D] [2488(1372)] cache flushed
[Sun May 26 14:00:28 2013] [I] [2488(1372)] "POST /dispatcher/invalidate.cache" 0 13 31ms
May I know whether I missed anything or if there is any specific configuration / setup I need to do to make this work?