You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <dh...@csir.co.za> on 2007/09/07 14:57:15 UTC

Clearing specific parts of a cache

I have the same problem as outlined here:
http://marc.info/?l=xml-cocoon-users&m=114836854807982&w=2 

i.e. "If I have a change in my flowscript file, I have 
to restart the server to get the result."

(As for the case of the original poser, I cannot do this on a 
regular basis as the startup/shutdown takes about 15 minutes, 
which annoys a lot of the users... especially the accountants!)

In the thread, there were two responses:

Suggestion 1:  use <map:pipeline type="noncaching"> 
Suggestion 2:  use the ClearCache Action

both of these imply a change to the application, which to me is
an artificial workaround, because the real issue is that there 
needs to be some simple way to clear Cocoon's cache by
hand, once changes to specifc files have been made.

This message:
http://marc.info/?l=xml-cocoon-users&m=113817605801213&w=2 
says you should delete Tomcat/Work and Tomcat/temp - but these 
are deeply nested directories with many files.  All I need to 
do is delete the cached files of my current application:-
how do I locate where those are housed?

Thanks
Derek



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Clearing specific parts of a cache

Posted by Derek Hohls <dh...@csir.co.za>.
Thanks Grzegorz - reloading the sitemap did it!
(could also have been that I was impatient and that changes
did not show up as fast on the server as on my PC....)

>>> Grzegorz Kossakowski <gk...@apache.org> 2007/09/07 04:34 PM >>>
Derek Hohls pisze:
> Grzegorz 
> 
> I hear what you are saying; so then why is Cocoon not handling /
> reflecting changes in the files that have been made - surely I should
> not need to add extra code to an application for something that is
> part of normal operations - or are you implying that Cocoon is *not*
> set up to detect changes in certain kinds of files and so the web 
> developer must track the changes through the application?

Let's be more specific. You have a problem with reloading of flowscript files, right?
Do you want this reloading enabled because of normal course of development or do you want to have
reloading because you want to update your application on production server and do not want to
restart server?

As I mentioned earlier, reloading of flowscript files is controlled by "javascript.reload-scripts"
property that should be set to true. Check your settings, please. If it still does not work you
might want to try touch a sitemap (just to change last modification date of sitemap.xmap file) that
reference your flowscript files. Reloading of sitemap should cause reloading of flowscript, too.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Clearing specific parts of a cache

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Derek Hohls pisze:
> Grzegorz 
> 
> I hear what you are saying; so then why is Cocoon not handling /
> reflecting changes in the files that have been made - surely I should
> not need to add extra code to an application for something that is
> part of normal operations - or are you implying that Cocoon is *not*
> set up to detect changes in certain kinds of files and so the web 
> developer must track the changes through the application?

Let's be more specific. You have a problem with reloading of flowscript files, right?
Do you want this reloading enabled because of normal course of development or do you want to have
reloading because you want to update your application on production server and do not want to
restart server?

As I mentioned earlier, reloading of flowscript files is controlled by "javascript.reload-scripts"
property that should be set to true. Check your settings, please. If it still does not work you
might want to try touch a sitemap (just to change last modification date of sitemap.xmap file) that
reference your flowscript files. Reloading of sitemap should cause reloading of flowscript, too.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Clearing specific parts of a cache

Posted by Derek Hohls <dh...@csir.co.za>.
Grzegorz 

I hear what you are saying; so then why is Cocoon not handling /
reflecting changes in the files that have been made - surely I should
not need to add extra code to an application for something that is
part of normal operations - or are you implying that Cocoon is *not*
set up to detect changes in certain kinds of files and so the web 
developer must track the changes through the application?

Derek

>>> Grzegorz Kossakowski <gk...@apache.org> 2007/09/07 03:33 PM >>>
Derek Hohls pisze:
> I have the same problem as outlined here:
> http://marc.info/?l=xml-cocoon-users&m=114836854807982&w=2 
> 
> i.e. "If I have a change in my flowscript file, I have 
> to restart the server to get the result."
> 
> (As for the case of the original poser, I cannot do this on a 
> regular basis as the startup/shutdown takes about 15 minutes, 
> which annoys a lot of the users... especially the accountants!)

I agree that restarting the server is not an option. Can you check value of
javascript.reload-scripts property in WEB-INF/properties/core.properties file? It must be set to true.

> In the thread, there were two responses:
> 
> Suggestion 1:  use <map:pipeline type="noncaching"> 
> Suggestion 2:  use the ClearCache Action
> 
> both of these imply a change to the application, which to me is
> an artificial workaround, because the real issue is that there 
> needs to be some simple way to clear Cocoon's cache by
> hand, once changes to specifc files have been made.

You should NEVER manipulate Cocoon's cache by hand IMHO. If some stale and unwanted content is
sitting in the cache it's proof that something with cache invalidation is wrong. Cocoon cache should
always be managed by Cocoon driven by cache entries validity objects.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Clearing specific parts of a cache

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Derek Hohls pisze:
> I have the same problem as outlined here:
> http://marc.info/?l=xml-cocoon-users&m=114836854807982&w=2 
> 
> i.e. "If I have a change in my flowscript file, I have 
> to restart the server to get the result."
> 
> (As for the case of the original poser, I cannot do this on a 
> regular basis as the startup/shutdown takes about 15 minutes, 
> which annoys a lot of the users... especially the accountants!)

I agree that restarting the server is not an option. Can you check value of
javascript.reload-scripts property in WEB-INF/properties/core.properties file? It must be set to true.

> In the thread, there were two responses:
> 
> Suggestion 1:  use <map:pipeline type="noncaching"> 
> Suggestion 2:  use the ClearCache Action
> 
> both of these imply a change to the application, which to me is
> an artificial workaround, because the real issue is that there 
> needs to be some simple way to clear Cocoon's cache by
> hand, once changes to specifc files have been made.

You should NEVER manipulate Cocoon's cache by hand IMHO. If some stale and unwanted content is
sitting in the cache it's proof that something with cache invalidation is wrong. Cocoon cache should
always be managed by Cocoon driven by cache entries validity objects.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org