How to disable mongodb cache

I am performing some calculations on datasets and adding some new information to each collection row. I have over 8 billion records in the database.

I do not need the cache as I am only going to traverse all rows and update them. MongoDB is caching data in memory. There is a way to make it memory-optimized. Is it possible to disable cache or clear it as soon as I have done processing? I have a 64 GB computer, it’s taking more than 25 GB of memory.