I’m using Coldbox’s event caching but I have noticed that the final response code in the header is not preserved on subsequent calls to the same event. So, the first request might return a 404 HTTP response code as expected but the second request to the same URL will always return a 200 HTTP response code (even though the rendered content is the same).
Is there a way to tell Coldbox to also cache the response code?
This is how I’m setting the HTTP header in the cached handler.
event.setHTTPHeader( "404", "Not Found" );
First request:
Subsequent (cached) requests: