await all the cache-invalidation operations during logout and catch errors to actually perform all operations.