lijogrg444 Most of the time, the tools like these recommend a higher Cache Period than 30 Days for your site's static assets. So, you need to change the value from the following file:
/etc/nginx/common/locations-wo.conf
Change expires 30d;
to expires max;
which will allow your assets to be cached for a longer period than a month (1 Year to be specific) and the warning from such tools shall not be shown anymore.
Note: You will need to restart the nginx after making the configuration changes. First, run nginx -t
to make sure you don't have any type/error with the configuration change and then restart the webserver through service nginx restart
However, it's just about the tools & score because in real scenario the Cache Period of 1 Month is quite sufficient for most of the sites.
In fact, a Facebook study found that in 42% of cases, a cache is no more than 47 hours old.
Recommended Reading: https://ashton.codes/set-cache-control-max-age-1-year/