Welcome! Log In Create A New Profile

Advanced

Cache only one specific query string pattern

Palvelin Postmaster via nginx
September 25, 2018 09:38AM
I use Wordpress’ REST API post feed to embed articles on an external site. My articles are updated fairly seldom, so there’s probably no need to dynamically compile every request response. I’m thinking of using fastcgi cache to cache the feed.

I’m currently skipping caching for all requests with a $query_string. However, the REST API URL’s also contain a query string and thus don’t currently get cached.

if ($query_string != "") {
set $skip_cache 1;
}

Is it possible to cache the REST API URL’s but skip cache for all other URL’s containing a $query_string?


--
Palvelin.fi Hostmaster
postmaster@palvelin.fi

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Cache only one specific query string pattern

Palvelin Postmaster via nginx September 25, 2018 09:38AM

Re: Cache only one specific query string pattern

Palvelin Postmaster via nginx September 25, 2018 11:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready