Skip to content

Commit be2306c

Browse files
authored
Merge pull request #160 from psaux-it/expand_skip_cache_query
expand skip_cache_query
2 parents 465fa6e + ca55978 commit be2306c

1 file changed

Lines changed: 44 additions & 2 deletions

File tree

nginx/nginx.conf

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ http {
141141
# WordPress nonces, preview mode & Customizer
142142
~*(?:^|&)(?:_wpnonce|preview|preview_id|preview_nonce|customize_changeset|wp_customize)= 1;
143143

144-
# Search queries & manual cache bypass flags
145-
~*(?:^|&)(?:_skip_cache|s|nocache)= 1;
144+
# Manual cache bypass flags
145+
~*(?:^|&)(?:_skip_cache|nocache)= 1;
146146

147147
# REST API via index.php?rest_route= (covers oEmbed too)
148148
~*(?:^|&)rest_route= 1;
@@ -152,6 +152,48 @@ http {
152152

153153
# Comment reply anchor — no content difference, avoids duplicate cache entries
154154
~*(?:^|&)replytocom= 1;
155+
156+
# Searches
157+
~*(?:^|&)s(?:[=&]|$) 1;
158+
159+
# Comment moderation preview tokens
160+
~*(?:^|&)(?:unapproved|moderation-hash)= 1;
161+
162+
# Deprecated Google AJAX crawling scheme
163+
~*(?:^|&)_escaped_fragment_= 1;
164+
165+
# E-commerce/CMS scanner probes (OpenCart route=, PrestaShop controller=)
166+
~*(?:^|&)(?:route|controller)= 1;
167+
168+
# Referral & tracking params — prevent duplicate cache entries
169+
~*(?:^|&)(?:ref|referrer|source)= 1;
170+
171+
# Plugin internal parameters
172+
~*(?:^|&)(?:wmo_hc|wph)= 1;
173+
174+
# Unique-per-click tracking IDs — caching is pointless, value is unique per click
175+
~*(?:^|&)(?:srsltid|fbclid|gclid|dclid|msclkid|twclid|mc_cid|mc_eid|_gl)= 1;
176+
177+
# UTM campaign parameters — identical content to the clean URL
178+
~*(?:^|&)utm_(?:source|medium|campaign|term|content|id|name)= 1;
179+
180+
# Ad platform click IDs — unique per click, companion params to gclid/fbclid
181+
~*(?:^|&)(?:gad_source|gclsrc|epik|irclickid|irgwc)= 1;
182+
183+
# Campaign/Ad performance params — unique per ad group session
184+
~*(?:^|&)(?:campaignid|adgroupid)= 1;
185+
186+
# Email marketing tracking tokens — unique per send/subscriber
187+
~*(?:^|&)(?:mkt_tok|ck_subscriber_id|sseid|sslid|_ke|__s|_kx|vgo_ee|dm_i|_bta_tid|_bta_c)= 1;
188+
189+
# Google Analytics cross-domain linker — unique per session
190+
~*(?:^|&)_ga= 1;
191+
192+
# Facebook engagement params — tracking only, no content change
193+
~*(?:^|&)(?:fb_action_ids|fb_action_types|fb_source)= 1;
194+
195+
# WordPress/plugin optimization flags — same content, no need for separate cache entry
196+
~*(?:^|&)(?:ao_noptimize|cn-reloaded|age-verified|usqp)= 1;
155197
}
156198

157199
# 3. Cookie-based exclusions

0 commit comments

Comments
 (0)