@dvk filters are your friends. Filters in Mastodon are pretty flexible, and I really like the ability to have a time period on some filters. Might save your sanity!
@liztai love this. A couple of weeks ago we did a week of duck, starting with simmered duck of which we ate legs and thighs, breast the next night, duck pilaf for two nights with the rest of the meat and some duck stock, and a vege soup with the remaining duck stock. Superb eating.
Does OpenLiteSpeed honour the header "Vary: Accept"? From examples I've seen, it honours other Vary values. You should be able to get separate caches for each Accept value – not just text/html and application/activity+json but any others sent.
Try setting that header in the plugin, clear the OpenLightSpeed cache, and test.
header('Vary: Accept');
@pfefferle do you plan to add that to the plugin? It should automatically fix nginx, and any other caches that support Vary headers.
Then you should be able to break caching with this:
if ($http_accept = "application/json") { set $no_cache 1; }
But nginx will cache different content based on the Accept header if you tell it to, e.g. as long as #WordPress#ActivityPub sends this with its responses, cache will differ by Accept header: