From acd5117037b2ceeb22a4a9ec1dceb550941de5a0 Mon Sep 17 00:00:00 2001
From: Evan Broder <broder@mit.edu>
Date: Mon, 17 Nov 2008 13:20:04 -0500
Subject: [PATCH] Now that consolefs is really caching, cache for a shorter
 period of time

svn path=/trunk/packages/invirt-console-server/; revision=1700
---
 debian/changelog               |    3 ++-
 files/usr/bin/invirt-consolefs |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 27e67bf..13f29f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 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
 
diff --git a/files/usr/bin/invirt-consolefs b/files/usr/bin/invirt-consolefs
index e092c21..b6e3844 100755
--- a/files/usr/bin/invirt-consolefs
+++ b/files/usr/bin/invirt-consolefs
@@ -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
 		"""
-		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())
-- 
1.7.9.5