MongoDB uses memory I / O, which means that the OS caches data, not the database, and it is not possible to disable this caching.
The OS typically uses the least recently used algorithm to remove the cache if memory is required, so if you do not request old data from MongoDB, these pages will be freed, which means that this will not really hurt Redis.
source share