how to define a struct that only need one time initialization and used for every request

Walter Chang weidezhang2007 at
Sat Jul 21 22:37:16 UTC 2012

Hi ,

I'm new to server development.  I have a c++ struct that need to be
initialized once from file and it will be used in each request since the
data it has is read only. I'm not sure what's the best practice to define
that struct in nginx module.

Shall I put it in the module loc config or just define it as a global
variable ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list