'Take an open cache file `f` and delete it if it\'s expired.'

def _is_expired(self, f):

    exp = pickle.load(f)
    if ((exp is not None) and (exp < time.time())):
        f.close()
        self._delete(f.name)
        return True
    return False
