Data cached in a global variable for DataLoader is cleared for different epoches!

Have a look at this thread for some information on caching with multiple workers using shared arrays.