View Source

{note}The commands in this guide are strongly biased towards UNIX type systems.{note}

After applying some changes to the KIM server like:
* modifications on the ontology
* modifications on the knowledge base
* modifications on the parameters of the IE resources
* other changes that affect the functionality of the server

We recommend you to clear the already generated indexes and all kinds of cache, as well as the logs, in order to be able to more easily diagnose if problems arise.

h3. Stop KIM and Tomcat

Stop those applications in order to clear the caches.
{code}
bash $TOMCAT_HOME/bin/shutdown.sh
bash $KIM_HOME/bin/kim stop
{code}

(!) For the Jetty based KIM 3.6 stopping only KIM is enough.

h3. Clear KIM caches

Basically all the cache KIM generates lives in *KIM_HOME>/context/default/populated* folder. So in order to remove the cache, we should Remove the *<KIM_HOME>/context/default/populated* folder
{code}
rm -rf $KIM_HOME/context/default/populated
{code}

h3. Clear KIM logs

Remove the content of *<KIM_HOME>/log* folder
{code}
rm -rf $KIM_HOME/log/*
{code}

h3. Clear Tomcat cache

Remove the deployed web archive
{code}
rm -rf $TOMCAT_HOME/webapps/KIM
{code}
A recommended, although not mandatory, step would be to clear tomcat's generated cache
{code}
rm -rf $TOMCAT_HOME/work/*
{code}

h3. Clear Tomcat logs
{code}
rm -rf $TOMCAT_HOME/logs/*
{code}