Hi Ivo,
Here's a module that is able to dump memory contents to the logs. I think you could leverage this directly or at least get some inspiration from it:
https://www.dropbox.com/s/z1dh8f9uae0ahxh/MemoryManagement.mpk?dl=0
Hi Ivo,
Does this help you: https://docs.mendix.com/refguide/monitoring-mendix-runtime
See for example part 4 about the cache statistics.