luison edited a comment on issue #1626: LoadFromFileCacheTtlMs does not control 
how often the file-system is re-checked.
URL: 
https://github.com/apache/incubator-pagespeed-ngx/issues/1626#issuecomment-470698854
 
 
   Hi. Sorry to jump into this specific query but I am trying to understand  
the updating system of sources of pagespeed when using the extended_cache 
filter related to the  LoadFromFileCacheTtlMs 
   
   I posted a question on the google group (https://goo.gl/SgCWBj) but I'll try 
to briefly ask my question here as I am about to give up on it.
   
   We are trying to improve a nginx cache proxy in front of various apache 
servers on containers. Our setup was intercepting static content... (css, js, 
images, etc) extending cache headers, proxying and caching:
   
   client  -->  nginx proxy cache for css, js, images.. --> backend apache 
   client  -->  nginx proxy (no cache) for the rest --> backend apache 
   
   Our intention now is to add pagespeed in order to improve in general and 
particularly css and JS further by concatenating (css + js) and properly 
versioning to extend caches which I understand is exactly what extended_cache 
filter does. (A list of our active filters bellow.)
   
   Our doubts/issues are coming from some css and JS after treated by pagespeed 
do not get updated after a change and remain staled. This happens even if we've:
   
   1. forced the expires headers of the apache backend to 30 seconds. Would 
pagespeed use this value at all as a TTL to recheck the backend or will it use 
the one returned by the nginx-cache?
   2.- forced the nginx-proxy-cache for static files to bypass the cache and 
set it to no-store for testing. Again... is pagespeed using this or the backend 
expires?
   3.- cleared the cache for the specific file (ie 
/ass/skins/def/css/bootstrap.min.css+main.gis.css.pagespeed.cc.7FZQ-V4k-L.css) 
via the /pagespeed_admin. Only when clearing the whole pagespeed cache... the 
file gets updated
   
   So a file as 
/ass/skins/def/css/bootstrap.min.css+main.gis.css.pagespeed.cc.7FZQ-V4k-L.css 
remains so after a change on the backend whatsoever.
   
   This is what that root reports in the cache:
   ```
   Metadata cache key:rname/cc_A5CWJ1Ij7nG9n_XUZo0i/t/vozrWfLE89IPR4eF0bW@
   cache_ok:true
   can_revalidate:false
   partitions:partition {
     optimizable: true
     url: 
"https://xxxxxx/ass/skins/def/css/bootstrap.min.css+main.gis.css.pagespeed.cc.7FZQ-V4k-L.css";
     input {
       index: 0
       type: CACHED
       last_modified_time_ms: 1547041050000
       expiration_time_ms: 1554586471000
       date_ms: 1551994471000
       input_content_hash: "7Du1KgDhdqcYHUVN_66iG"
       url: "https://xxxxxxx/ass/skins/def/css/bootstrap.min.css";
     }
     input {
       index: 1
       type: CACHED
       last_modified_time_ms: 1551993894000
       expiration_time_ms: 1554586471000
       date_ms: 1551994471000
       input_content_hash: "UGK37FuBTQjWD1AQi_GCT"
       disable_further_processing: true
       url: "https://xxxxxxxxxxxxxxxxxxxxxxxxxxx/ass/skins/def/css/main.gis.css";
     }
   }
   ```
   Even after clicking "delete" on that, no change. Only once I clear the whole 
pagespeed cache through the backend I get an updated version.
   
   I'm probably not understanding something:
   - do I require additional setup if using nginx proxy cache as in doc:  
https://www.modpagespeed.com/doc/downstream-caching.html considering this 
scenario. I am happy with html not being cached.
   - does pagespeed "read" files from nginx-cache-proxy or is it aware of the 
backend upstream too?
   - Would setting a lower value to LoadFromFileCacheTtlMs change anything? I 
understand default is 5 minutes if "no expires" header are set. What about if 
they are? Does the TTL become the Expires of the source brought by http from 
the backend or as I guess this value is only good for "local" disk access reads?
   - should I just make nginx act as non-cache proxy and let pagespeed deal 
completely with that?
   
   Thanks.
   
   Active FIlters 
   ah   Add Head
   ai   Add Instrumentation
   cc   Combine Css
   jc   Combine Javascript
   gp   Convert Gif to Png
   jp   Convert Jpeg to Progressive
   jw   Convert Jpeg To Webp
   mc   Convert Meta Tags
   pj   Convert Png to Jpeg
   ws   When converting images to WebP, prefer lossless conversions
   ec   Cache Extend Css
   ei   Cache Extend Images
   es   Cache Extend Scripts
   fc   Fallback Rewrite Css 
   if   Flatten CSS Imports
   hw   Flushes html
   ci   Inline Css
   ii   Inline Images
   il   Inline @import to Link
   ji   Inline Javascript
   idp  Insert DNS Prefetch
   js   Jpeg Subsampling
   cj   Move Css Above Scripts
   pr   Prioritize Critical Css
   rj   Recompress Jpeg
   rp   Recompress Png
   rw   Recompress Webp
   ri   Resize Images
   cf   Rewrite Css
   jm   Rewrite External Javascript
   jj   Rewrite Inline Javascript
   cu   Rewrite Style Attributes With Url
   cp   Strip Image Color Profiles
   md   Strip Image Meta Data
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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