invalidateCacheForUser static method
Invalidates the cache for a user and makes sure the next time a user info is fetched it's fresh from the database.
Implementation
static Future<void> invalidateCacheForUser(
Session session,
int userId,
) async {
var cacheKey = 'serverpod_auth_userinfo_$userId';
await session.caches.local.invalidateKey(cacheKey);
}