'Return the previously cached UIDVALIDITY value
:returns: UIDVALIDITY as (long) number or None, if None had been
saved yet.'

def get_saveduidvalidity(self):

    if hasattr(self, '_base_saved_uidvalidity'):
        return self._base_saved_uidvalidity
    uidfilename = self._getuidfilename()
    if (not os.path.exists(uidfilename)):
        self._base_saved_uidvalidity = None
    else:
        file = open(uidfilename, 'rt')
        self._base_saved_uidvalidity = int(file.readline().strip())
        file.close()
    return self._base_saved_uidvalidity
