Another very simple option in #Vinyl_Cache is to limit the size of request bodies using std.cache_req_body(). This also has the added benefit that chunked transfer encoding is tuned into a request with a content-length, such that php can check it upfront against the maximum body size.
In the example, the maximum size should be adjusted accordingly.
https://vinyl-cache.org/docs/trunk/reference/vmod_std.html#std-cache-req-body
