Check out the technique in the video MongoDB: Touch (Load Data Into Memory). This technique can be useful in a variety of environments - especially environments where we need to store a part of our data in memory since the data are more frequently accessed. As we see, this happens on the collection level and we can specify the data and index. We do not have to specify both. People familiar with their environment may study which collections would be best served being in memory (in rare cases, all).
Check out the highest-rated Automating ETL course on Udemy, if you're interested in data.
For situations where we may want to use a caching layer with an API, MongoDB provides us with a useful tool for this. In the past, several of my clients have used MongoDB for their cached JSON API calls with another back-end underneath it.