title: API Platform with alternative Runtime, Caddy, Vulcain, Cache ecosystem
body: <p>Currently I'm investigating a setup backed by api-platform with the following goals:</p>
  <ul>
  <li>the PHP backend MUST yield minimal resource payloads, thus I do not want to embed relations at all</li>
  <li>the PHP backend SHOULD be able to run in alternative runtimes, e.g. Swoole</li>
  <li>the webserver should push related resources via HTTP2 Push leveraging the built in vulcain support of the api-platform distribution</li>
  </ul>
  <p>I cannot find that many resources about those setups - at least not in such a form that they answer subsequent questions sufficiently.</p>
  <p>My starting setup was simply based on the <a href="https://github.com/api-platform/api-platform/releases/tag/v2.6.8" rel="nofollow noreferrer">api-platform distribution 2.6.8</a></p>
  <p>So, until now I've learned the following things:</p>
  <ul>
  <li>out of the box, the caddy + http2 push setup works with the PHP container being based on <code>php:8.1-fpm-alpine</code> - while caddy is obviously directly using <code>php_fastcgi</code></li>
  <li>when I was fooling around with the currently available <a href="https://github.com/caddyserver/cache-handler" rel="nofollow noreferrer">cache-handler</a> I was able to get the http cache working but I was struggling to find any information about cache invalidation works. The api-platform docs mostly focus on varnish; there is also only a <code>VarnishPurger</code> shipped in the api-platform core. Wring a custom one should not be that hard <em>if</em> the caddy cache-handler somehow allows <code>BAN</code> requests or something similar - where to find info about that? I see that the handler is based on <a href="https://github.com/darkweak/souin" rel="nofollow noreferrer">Souin</a> - but as unfamiliar as I am I have no clue how (and if) Souin supports cache invalidation after all.</li>
  <li>when changing the php container to be (in my current testing scenario) based on <a href="https://openswoole.com/" rel="nofollow noreferrer">Swoole</a> then <code>php_fastcgi</code> cannot be used in caddy - instead, I ended up using <code>reverse_proxy</code> (as described in <a href="https://github.com/dunglas/vulcain/blob/main/docs/caddy.md#configuration" rel="nofollow noreferrer">vulcain docs</a>) which basically works and serves proper http responses but does not push any resources requested with <code>Preload</code> headers (as I said, it worked when the PHP backend was based on PHP-FPM). How can I debug what happens here? Caddy does not yield any info about the <code>push</code> handling - nor does the vulcain caddy module</li>
  </ul>
  <p>Long story short(er): to sum up my questions</p>
  <ul>
  <li>how can I figure out why caddy + vulcain is not working in a reverse_proxy setup?</li>
  <li>is the current state of the caddy cache handler functional / supported by the api-platform distribution</li>
  <li>how to implement/support <code>BAN</code> requests (or other fine grained cache invalidation) for caddy cache handler?</li>
  </ul>