luca regini wrote:
If you use prefork, each child is a fork and has it's own memory space, so you are unable to share data between child -> bad ideaTaking a look at mod_mem_cache source code i have seen that it doesn't use pools to allocate cache objects but i does so by means of reference counting and simple calloc/free calls. I have also seen that this module requires a Threaded apr to work.
The way you can do is code a cache module using shared memory but in this case, shm and rmm are not using pools, and i think there will be performances issues.
It depend on what you want to do with your cache module. Actually, in a threaded mpm, each child and the threads inside are sharing common data. So you have duplicated cache data in each forked child. The performance depend on how you setup your server. low child number and high thread number = few request on backend and only few duplicated data.
Coding a cache module using shared memory is huge work. Good luck if you choose to do it
Matthieu