etwist/twctl.py
changeset 7619 0d0344fd5231
parent 7140 ba51dac1115d
child 9372 e87a808a4c32
--- a/etwist/twctl.py	Tue Jul 05 10:54:52 2011 +0200
+++ b/etwist/twctl.py	Tue Jul 05 12:09:53 2011 +0200
@@ -17,6 +17,10 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """cubicweb-clt handlers for twisted"""
 
+from os.path import join
+
+from logilab.common.shellutils import rm
+
 from cubicweb.toolsutils import CommandHandler
 from cubicweb.web.webctl import WebCreateHandler
 
@@ -32,6 +36,9 @@
 
     def start_server(self, config):
         from cubicweb.etwist import server
+        config.info('clear ui caches')
+        for cachedir in ('uicache', 'uicachehttps'):
+            rm(join(config.appdatahome, cachedir, '*'))
         return server.run(config)
 
 class TWStopHandler(CommandHandler):