Use expandOwner/expandAdmin rather than removed expandLocker
[invirt/packages/invirt-web.git] / code / view.py
index 9452cf0..5f32874 100644 (file)
@@ -7,6 +7,7 @@ import simplejson
 import datetime, decimal
 from StringIO import StringIO
 from invirt.config import structs as config
+import invirt.database
 from webcommon import State
 
 
@@ -163,6 +164,9 @@ cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource',
                                               invirtwebstate_init, priority=100)
 
 
+cherrypy.tools.clear_db_cache = cherrypy.Tool('on_start_resource', invirt.database.clear_cache)
+
+
 class View(object):
     _cp_config = {'tools.mako.directories':
                       [os.path.join(os.path.dirname(__file__),'templates')]}