dvershinin opened a new issue #1626: LoadFromFileCacheTtlMs is quite broken
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1626
 
 
   There are several issues actually I want to mention here.
   
   First. One may assume that `LoadFromFileCacheTtlMs` allows to have 
ngx_pagespeed only check files for changes for a configured number of seconds. 
However this isn't this case as it only controls `Cache-Control` and `Expires` 
headers sent out. 
   
   ngx_pagespeed seems to *check files for changes upon every request* which 
has a potential for improvement. We want to stop those mtime checks which 
happen on every request, as this would reduce I/O quite a lot on busy sites. 
Can we have a `LoadFromFileCacheStatMs`, please ???
   
   Second, I found `LoadFromFileCacheTtlMs`  to behave quite strangely as it is 
(1.13.35.2-0). Mainly in my testing:
   
   * With `pagespeed LoadFromFileCacheTtlMs < 1000`, the first request will 
result in `cache-control:   public, max-age=315360000, s-maxage=10`, while 
second, **and any further** request to optimized cache extended resource with 
`.pagespeed` prefix will yield `cache-control: max-age=0,no-cache`!
   
   * With `pagespeed LoadFromFileCacheTtlMs >= 1000`, the first request will 
result in `cache-control   
   max-age=1` (or 3, or few seconds otherwise), while second, and any further 
request to optimized cache extended resource with `.pagespeed` prefix will 
yield `cache-control:max-age=31536000`
   
   So multiple issues there:
   
   * Values lower than 1000 result in no cacheability at all (I have no idea 
why that number is a breaking point)
   * Values over 1000 result in cacheability, but there is no actual control of 
the value, since 31536000 seems to be hardcoded
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to