On this page本页内容
PlanCache.clear()
Removes all cached query plans for a collection.删除集合的所有缓存查询计划。
The method is only available from the 该方法仅在特定集合的计划缓存对象中可用;即。plan cache object
of a specific collection; i.e.
db.collection.getPlanCache().clear()
For example, to clear the cache for the 例如,要清除orders
collection:orders
集合的缓存:
db.orders.getPlanCache().clear()
On systems running with 在使用authorization
, a user must have access that includes the planCacheWrite
action.authorization
运行的系统上,用户必须具有包含planCacheWrite
操作的访问权限。