You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the different between ngx.var and ngx.ctx? I know var can only hold string values, while ctx can hold any variable, so it seems like it's easier to use ngx.ctx all the time.
Does the ctx persist through internal proxies? Does it have any performance issues? When should one use var or ctx?
The text was updated successfully, but these errors were encountered:
@ktalebian Use ngx.ctx wherever you can. ngx.var is much more expensive and is also limited to string values. The latter should only be used to exchange data with other nginx C modules.
BTW, please join the openresty-en mailing list for such general usage questions. This place is reserved for real bug reports and patch submissions. Thanks for
your cooperation! Please see https://openresty.org/en/community.html
What is the different between
ngx.var
andngx.ctx
? I knowvar
can only hold string values, whilectx
can hold any variable, so it seems like it's easier to usengx.ctx
all the time.Does the
ctx
persist through internal proxies? Does it have any performance issues? When should one usevar
orctx
?The text was updated successfully, but these errors were encountered: