Docs Home → Develop Applications → MongoDB Manual
Query Plan Cache Methods![](/docs/v5.3/assets/link.svg)
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoDB server.
The PlanCache methods are only accessible from a collection's plan
cache object. To retrieve the plan cache object, use the
db.collection.getPlanCache()
method.
Note
For details on specific methods, including syntax and examples, click on the specific method to go to its reference page.
Name | Description |
---|---|
Returns an interface to access the query plan cache object and
associated PlanCache methods for a collection. | |
Clears all the cached query plans for a collection.
Accessible through the plan cache object of a specific collection,
i.e. db.collection.getPlanCache().clear() . | |
Clears the cached query plans for the specified query shape.
Accessible through the plan cache object of a specific collection,
i.e. db.collection.getPlanCache().clearPlansByQuery() | |
Displays the methods available for a collection's query plan cache.
Accessible through the plan cache object of a specific collection,
i.e. db.collection.getPlanCache().help() . | |
Returns the plan cache information for a collection. Accessible
through the plan cache object of a specific collection, i.e.
New in version 4.4. |