Re: Singleton Persistence
Perrin Harkins <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <CAC0_be1PFz86YTxTNKOLvjmP7-2RP67SuW+MfODHzYSNT8A0Qg@mail.gmail.com> |
On Sat, Feb 1, 2014 at 8:14 PM, John Dunlap <[email protected]> wrote: > In mod_perl, can instantiated singletons survive requests? Sure, anything you put in a global will survive until the httpd child process is shut down. How many requests each child serves depends on your configuration. When a new child starts up, it will have the same state as the parent process, so if you put something into a global in the parent, it will be there in the children. There is no sharing between processes though, so changes in a child process will not be reflected in the other processes or in newly spawned ones. - Perrin