Caching with nginx
You can use headers to specify the range of rows in PostgREST, but it doesn’t work with proxy_cache enabled in nginx:
If caching is enabled, the header fields “If-Modified-Since”, “If-Unmodified-Since”, “If-None-Match”, “If-Match”, “Range”, and “If-Range” from the original request are not passed to the proxied server.
A potentially valid configuration for anonymous requests only:
proxy_cache your_cache;
proxy_cache_valid 200 1h;
proxy_cache_method GET;
proxy_cache_convert_head off;
proxy_cache_key "..."; # lots of headers that may affect results
proxy_cache_bypass $http_authorization $http_range;