'Tests if the cached UIDVALIDITY match the real current one
If required it saves the UIDVALIDITY value. In this case the
function is not threadsafe. So don\'t attempt to call it from
concurrent threads.
:returns: Boolean indicating the match. Returns True in case it
implicitely saved the UIDVALIDITY.'

def check_uidvalidity(self):

    if (self.get_saveduidvalidity() != None):
        return (self.get_saveduidvalidity() == self.get_uidvalidity())
    else:
        self.save_uidvalidity()
        return True
