I followed this tutorial to install OpenGrok on an Ubuntu server using Tomcat 7. I have created a cron job that will trigger OpenGrok to update its indexes overnight.
If I browse my source tree, by visiting http://mysite/opengrok/xref/
, the contents displayed are up-to-date. So the indexing clearly worked. But if I visit the home page, the contents are out-dated. The list of projects is not correct and the footer displays:
Indexes created XXXX
where "XXXX" is a date from several weeks ago. Ctrl-F5 does not help.
Some experimentation has determined that if I restart Tomcat, the home-page is updated. But this seems like a rather heavy-handed workaround. Is there another way I can force the home page to be updated?
Someone advised me to check the cacheTTL
value in my web.xml, but it wasn't specified which apparently means the default is 5 seconds (source).
Any suggestions?
I have few suggestions about debugging this problem
Tomcat reloads the app when it restarts. But you can reload the app easily without hassle by defining the resources you would like to be reloaded as WatchedResource as illustrated below.
Let me know if you make any progress.