Add caching hints for API calls
Yes, it's varnish. The API doesn't specify how long it should be cached, so it's getting Varnish's default of 2 minutes. The API should let varnish know how long to keep it:
-- cache for 3 seconds
PERFORM set_config('response.headers', '[{"Cache-Control": "public, max-age=3"}]', true);
or
-- cache forever
PERFORM set_config('response.headers', '[{"Cache-Control": "public, max-age=31536000"}]', true);
or any duration in between. Or,
-- don't
PERFORM set_config('response.headers', '[{"Cache-Control": "no-cache"}]', true);
I'll set the default to something more pessimistic until then.