Now that consolefs is really caching, cache for a shorter period of time invirt-console-server/0.1.0
authorEvan Broder <broder@mit.edu>
Mon, 17 Nov 2008 18:20:04 +0000 (13:20 -0500)
committerEvan Broder <broder@mit.edu>
Mon, 17 Nov 2008 18:20:04 +0000 (13:20 -0500)
svn path=/trunk/packages/invirt-console-server/; revision=1700

debian/changelog
files/usr/bin/invirt-consolefs

index 27e67bf..13f29f2 100644 (file)
@@ -1,8 +1,9 @@
 invirt-console-server (0.1.0) unstable; urgency=low
 
   * Add real caching to consolefs
 invirt-console-server (0.1.0) unstable; urgency=low
 
   * Add real caching to consolefs
+  * Now that we're really caching, cache for a shorter period of time
 
 
- -- Evan Broder <broder@mit.edu>  Mon, 17 Nov 2008 13:16:09 -0500
+ -- Evan Broder <broder@mit.edu>  Mon, 17 Nov 2008 13:16:37 -0500
 
 invirt-console-server (0.0.13) unstable; urgency=low
 
 
 invirt-console-server (0.0.13) unstable; urgency=low
 
index e092c21..b6e3844 100755 (executable)
@@ -45,7 +45,7 @@ class ConsoleFS(routefs.RouteFS):
        def recache(self):
                """Refresh the local cache of VMs if the cache is more than 15 minutes old
                """
        def recache(self):
                """Refresh the local cache of VMs if the cache is more than 15 minutes old
                """
-               if time() - self.lasttime > 15:
+               if time() - self.lasttime > 5:
                        self.lasttime = time()
                        database.clear_cache()
                        self.machines = dict((machine.name, machine) for machine in database.session.query(database.Machine).all())
                        self.lasttime = time()
                        database.clear_cache()
                        self.machines = dict((machine.name, machine) for machine in database.session.query(database.Machine).all())