'Determines if the cache files have expired, or if it is still valid'

def is_cache_valid(self):

    if os.path.isfile(self.cache_filename):
        mod_time = os.path.getmtime(self.cache_filename)
        current_time = time()
        if ((mod_time + self.cache_max_age) > current_time):
            return True
    return False
