My website has different themes for mobile and desktop pages and that's why I want to filter the homepage as the cache is breaking the UI on devices. I tried adding:
# Don't cache domain names
if ($request_uri ~* "sciencehook.com($|/$)") {
set $skip_cache 1;
}
but it didn't work. It's caching sciencehook.com anyways. Please let me know the mistake here.
Cache section looks like this:
# Don't cache domain names
if ($request_uri ~* "sciencehook.com($|/$)") {
set $skip_cache 1;
}
# Don't cache uris containing the following segments
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}
Thank you!
# Don't cache domain names
if ($request_uri ~* "sciencehook.com($|/$)") {
set $skip_cache 1;
}
but it didn't work. It's caching sciencehook.com anyways. Please let me know the mistake here.
Cache section looks like this:
# Don't cache domain names
if ($request_uri ~* "sciencehook.com($|/$)") {
set $skip_cache 1;
}
# Don't cache uris containing the following segments
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}
Thank you!