invalidateUserCache (original) (raw)

invalidateUserCache

Flushes user information from in-memory cache, including removal of each user's credentials and roles. This allows you to purge the cache at any given moment, regardless of the interval set in the userCacheInvalidationIntervalSecs parameter.

This command is available in deployments hosted in the following environments:

Important

This command is not supported in M0, M2, M5, and Flex clusters. For more information, see Unsupported Commands.

The command has the following syntax:


db.runCommand(

   {

     invalidateUserCache: 1

   }

)

You must have privileges that include theinvalidateUserCache action on the cluster resource in order to use this command.