SatelliteWP / rocket-nginx

Rocket-Nginx is a Nginx configuration that makes WP-Rocket even faster by serving static pages directly without loading WordPress or PHP.
MIT License
579 stars 129 forks source link

In version 3 I see images are not cached #175

Closed taikhoancapcao closed 2 years ago

taikhoancapcao commented 2 years ago

2022-01-16 054916

In version 3 I see images are not cached. I don't understand the config file you suggested below: Before Rocket-Nginx starts In the default profile, create a file in the conf.d/default/ having the following filename pattern : start.*.conf.

Globally in every section In the default profile, create a file in the conf.d/default/ having the following filename pattern : global.*.conf.

In the HTTP section In the default profile, create a file in the conf.d/default/ having the following filename pattern : http.*.conf.

In the CSS section In the default profile, create a file in the conf.d/default/ having the following filename pattern : css.*.conf.

In the JS section In the default profile, create a file in the conf.d/default/ having the following filename pattern : js.*.conf.

In the Media section In the default profile, create a file in the conf.d/default/ having the following filename pattern : media.*.conf.

Thank you very much!

maximejobin commented 2 years ago

Per your screenshot, it is cached for 30 days: image

This can be edited from the config file without creating any new file.

The Rocket-Nginx header is misleading as Rocket-Nginx simply edits the the expiration but does not "cache" the image. There is no point in doing that as it is already a static file. I might reconsider adding the header for medias.

taikhoancapcao commented 2 years ago

Thank you very much for taking the time to answer my question. Wish you always have health, happiness and success in life.