in reply to Synchronizing variables (in mod_perl) across Apache instances?

I assume that the variables will be changing while the server is running, as opposed to being set once when the server starts and you'll only change them when you shut down the server. (The latter is trivial).

Probably the best solution is to use either a database to store the variables, using SQL to retrive the values of the variables, or to use something like a tied hash pointed to a file to get the variables when requested. The latter, however, might suffer from file-locking-like problems, though you might be able to wrap a "while ( cant-open-file ) { }" loop in your tie such that you can get to the file when it's available.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
  • Comment on Re: Synchronizing variables (in mod_perl) across Apache instances?