What test do you do; what result do you see; and what result do you
expect to see?

> It is only a permalink (/%category%/%postname%/) from WordPress. All
> subpages (like www.domain.tld/gallery/flickr) should have no cache enabled
> because the plugin for those galleries doesn't work with caching.

nginx tends not to cache unless you configure it to.

Why do you think nginx is caching something that you do not want it to?

> How can I solve the problem?

I suspect that describing the problem in terms of specific things that
can be observed or tested will be a good start.