对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

invalidateUserCache(数据库命令)

invalidateUserCache

刷新内存缓存中的用户信息,包括删除每个用户的档案和角色。 这样,您就可以随时清除缓存,而无论userCacheInvalidationIntervalSecs参数中设置的时间间隔如何。

此命令可用于以下环境中托管的部署:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

重要

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

该命令具有以下语法:

db.runCommand(
{
invalidateUserCache: 1
}
)

要使用此命令,您必须具有包括对集群资源执行invalidateUserCache操作的权限。