Re: cache for ngx_http_time()

2013-08-16 Thread Maxim Dounin
Hello! On Mon, Aug 05, 2013 at 09:06:57PM +0300, Serguei I. Ivantsov wrote: > ngx_http_time() is called once per request and it call a heavy > ngx_sprintf() function. > Why not cache the output for one second (resolution of time_t)? > I find nice time caching framework on ngx_times.c, with slots

Re: cache for ngx_http_time()

2013-08-05 Thread Serguei I. Ivantsov
Actually this is "Last-Modified:" header. In case of several files, caching will improve processing speed, but it is useful for benchmarks only. In real life environment we have tons of files. ___ nginx-devel mailing list nginx-devel@nginx.org http://ma

cache for ngx_http_time()

2013-08-05 Thread Serguei I. Ivantsov
Hi! ngx_http_time() is called once per request and it call a heavy ngx_sprintf() function. Why not cache the output for one second (resolution of time_t)? I find nice time caching framework on ngx_times.c, with slots and memory barriers, but ngx_http_time() is not using it for some reason. In this