'Usage: cleancache - remove invalid entries from hash cache file'

def cleancache(self):

    if os.path.exists(self.__hashcachepath):
        try:
            backup = (self.__hashcachepath + u'.lastclean')
            shutil.copy(self.__hashcachepath, backup)
            self.pd(u"Hash    Cache    file    '{}'    backed    up    as    '{}".format(self.__hashcachepath, backup))
            cached.cleancache()
            return const.ENoError
        except Exception as ex:
            perr(formatex(ex))
            return const.EException
    else:
        return const.EFileNotFound
