Deleteing Cache
Hi
I have a Sun Web Server running jsp pages. The cache is enabled for website. Say I have a file e.g. xyz.jsp with date/time stamp as 31 - july -06. The cache has the latest file.
Now if i replace the xyz.jsp file with old version say 25-July-06, it is not updated in cache and still shows the old file in browser (cache copy).
I dont want to disable cache for the directory as it is not frequent. Please help how to go about it ?
[459 byte] By [
tarun_dce] at [2007-11-26 9:09:33]

# 1
well, if in case you have enabled 'cache' by explicitly setting this property in sun-web.xml for your web app, then you can always disable this feature.
http://docs.sun.com/source/817-6251/pwadeply.html#wp34434
but, i don't think, in your case, you are running into the above issue. by default, sun java system web server 6.1 compiles a jsp file at the time of a request and does not look again at this file until the date and time stamp as changed. i guess, this is one lype of cache and if i am not mistaken, you want web server to compile a jsp file irrespective of date and time stamp. so, with regards to this, check out the following link for more info on dynamic reload interval.
http://docs.sun.com/source/817-6251/pwadeply.html#wp25890
http://docs.sun.com/source/817-6251/pwadeply.html#wp38106
accordingly, you will need to edit your web apps's sun-web.xml and try adding something like below to https-*/webapps/https-*/webapp-name/WEB-INF/sun-web.xml
remove the following line <sun-web-app /> and add the below lines
<sun-web-app>
<jsp-config>
<property name="reload-interval" value="0" />
</jsp-config>
</sun-web-app>
you don't want to do have this setting in your production web site.
# 2
Thanks for replying, but the issue is that in my production server, some times a particular application (based on certain logical criteria), copies a old page (i.e. with old date time stamp) on sun one web server.
Since date/time stamp is old, the page does not refreshes (i.e. cache is not updated with old page). Thus it continues to display wrong page, even though physically page has beeln changed.
The frequency of application copying the old page in web server is not frequent and is irregular. One solution I know is to perform "touch" on old file. This will ca use old file to change to latest date/time stamp and server cache will update itself. But i want to perform a efficient and better way. Also reloading-interval=0 as you said is not good for production server. Please suggest?