@@ -104,6 +104,15 @@ location / {
104104location @drupal {
105105 limit_conn perip_conn 10;
106106 limit_req zone=drupal_rps burst=30 nodelay;
107+
108+ fastcgi_cache drupal_microcache;
109+ fastcgi_cache_key "$scheme$request_method$host$request_uri";
110+ fastcgi_cache_valid 200 301 302 10s;
111+ fastcgi_cache_valid 404 1s;
112+ fastcgi_cache_bypass $drupal_cache_bypass_method $drupal_cache_bypass_cookie $http_authorization $query_string;
113+ fastcgi_no_cache $drupal_cache_bypass_method $drupal_cache_bypass_cookie $http_authorization $query_string;
114+ add_header X-Cache $upstream_cache_status always;
115+
107116 include fastcgi.conf;
108117 fastcgi_param QUERY_STRING $query_string;
109118 fastcgi_param SCRIPT_NAME /index.php;
@@ -114,6 +123,15 @@ location @drupal {
114123location @drupal-no-args {
115124 limit_conn perip_conn 10;
116125 limit_req zone=drupal_rps burst=30 nodelay;
126+
127+ fastcgi_cache drupal_microcache;
128+ fastcgi_cache_key "$scheme$request_method$host$request_uri";
129+ fastcgi_cache_valid 200 301 302 10s;
130+ fastcgi_cache_valid 404 1s;
131+ fastcgi_cache_bypass $drupal_cache_bypass_method $drupal_cache_bypass_cookie $http_authorization;
132+ fastcgi_no_cache $drupal_cache_bypass_method $drupal_cache_bypass_cookie $http_authorization;
133+ add_header X-Cache $upstream_cache_status always;
134+
117135 include fastcgi.conf;
118136 fastcgi_param QUERY_STRING q=$uri;
119137 fastcgi_param SCRIPT_NAME /index.php;
@@ -124,6 +142,15 @@ location @drupal-no-args {
124142location = /index.php {
125143 limit_conn perip_conn 10;
126144 limit_req zone=drupal_rps burst=30 nodelay;
145+
146+ fastcgi_cache drupal_microcache;
147+ fastcgi_cache_key "$scheme$request_method$host$request_uri";
148+ fastcgi_cache_valid 200 301 302 10s;
149+ fastcgi_cache_valid 404 1s;
150+ fastcgi_cache_bypass $drupal_cache_bypass_method $drupal_cache_bypass_cookie $http_authorization $query_string;
151+ fastcgi_no_cache $drupal_cache_bypass_method $drupal_cache_bypass_cookie $http_authorization $query_string;
152+ add_header X-Cache $upstream_cache_status always;
153+
127154 fastcgi_pass php;
128155}
129156
0 commit comments