Starting with Mongoid 4 / Moped 2 it supports it's own caching strategy known as Query Cache. It's thread based, so it has to be enabled in each thread. ThreadsOnFork creates separate number of threads(workers) for each tube, so we have to enable the query cache within each thread. I'm thinking the best practice would give a global hook to run on thread creation. I'll try to investigate this problem.
Starting with Mongoid 4 / Moped 2 it supports it's own caching strategy known as Query Cache. It's thread based, so it has to be enabled in each thread. ThreadsOnFork creates separate number of threads(workers) for each tube, so we have to enable the query cache within each thread. I'm thinking the best practice would give a global hook to run on thread creation. I'll try to investigate this problem.