Serve cached js/css files directly before sending them to PHP?
-
Hi,
I’m using WordPress + NGINX + WP Super Cache + BWP Minify.
I have a high traffic site with averages of 50,000 pageviews / day.
I noticed that for the NGINX configuration, you are using a rewrite rule that binds any request to .js/.css files to /index.php?blog=$1&min_group=$2&min_type=$3 last;.
What this seems to be doing is that although the .js/.css files exist and could be served directly with NGINX, they are always served through PHP (php-fpm in my case). This is hogging up alot of resources on my VPS.
Would there be a way to use something like the try_files directive instead, so .js/.css are served directly if they exist, and fallback to index.php to generate them and serve them if they don’t? That’s how WP Super Cache does it and it seems to be much much more efficient.
Thank you,
janvitos
- The topic ‘Serve cached js/css files directly before sending them to PHP?’ is closed to new replies.