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

Walter Chang weidezhang2007 at gmail.com
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 ?

Thanks,

Weide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120721/2332bee7/attachment.html>


More information about the nginx mailing list