Welcome! Log In Create A New Profile

Advanced

Re: questions about http variables: flags and no_cacheable

Maxim Dounin
April 15, 2010 07:18PM
Hello!

On Thu, Apr 15, 2010 at 10:41:37PM +0200, Manlio Perillo wrote:

> In my ngx_http_gateway module
> http://bitbucket.org/mperillo/ngx_http_gateway
> I'm implementing support for script_name and path_info variables, and I
> would like to ask some questions.
>
> * some variables have the ``NGX_HTTP_VAR_NOCACHEABLE`` flag set, however
> the get_handler set ``v->no_cacheable = 0``.
>
> What is the effect of setting ``v->no_cacheable = 0`` ?

There is no effect, it will be set to 1 anyway once flag is here.

Though this way it's consistent with cacheable variables and
NGX_HTTP_VAR_NOCACHEABLE flag can be removed safely (and
no_cacheable will be still initialized).

Note well that right now it's actually not needed at all as
indexed variables are allocated using ngx_pcalloc() (and
non-indexed variables don't use no_cacheable). But there was a
timeframe when it was indeed required.

> * what is the purpose of the NGX_HTTP_VAR_NOHASH flag?

These variables can only be used via index, not by name. It's
small optimization which may be used when you know that variable
isn't needed in ssi and/or perl.

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

questions about http variables: flags and no_cacheable

Manlio Perillo 2896 April 15, 2010 04:42PM

Re: questions about http variables: flags and no_cacheable

Maxim Dounin 1559 April 15, 2010 07:18PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready