def dirty(self):
      """True if the cache needs to be updated, False otherwise"""
      return not os.path.exists(self.cachename) or \
            (os.path.getmtime(self.filename) >
             os.path.getmtime(self.cachename))