Right now I’m importing a config module at the top of my content_by_lua that looks somewhat like this:
local json = require 'cjson'
return {
bot_api_key = os.getenv("TG_TOKEN"),
superadmins = json.decode(os.getenv(“SUPERADMINS")),
…
}
I wonder if this module is being cached or is it running countless ‘os.getenv’ calls on every request and/or if there’s any better way to manage application config on openresty.