Persistent Global Apache C ++ Module Objects

I want some global objects in the Apache C ++ module to be stored in all Apache child processes. How to do it?

+3
source share
1 answer

You should use some external memory for Apache processes.

The main options:

  • Database.
  • Shared memory (OS dependent).
  • Another process and use of an IPC mechanism (e.g. socket)
  • File.

Which one is right depends on your requirements, and you can combine them. For example, a “database” is actually implemented as another process that makes things persistent in a file and deals with concurrency problems in a known manner.

, , , , , .

+4

Source: https://habr.com/ru/post/1715373/


All Articles