Index: src/wp-includes/functions.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-includes/functions.php	(revision 44674)
+++ src/wp-includes/functions.php	(date 1548103690000)
@@ -3236,6 +3236,7 @@
 		if ( null !== $r['response'] ) {
 			status_header( $r['response'] );
 		}
+		nocache_headers();
 	}
 
 	echo wp_json_encode( $data );
@@ -3263,6 +3264,11 @@
 
 	list( $message, $title, $r ) = _wp_die_process_input( $message, $title, $args );
 
+
+	if ( ! headers_sent() ) {
+		nocache_headers();
+	}
+
 	if ( $wp_xmlrpc_server ) {
 		$error = new IXR_Error( $r['response'], $message );
 		$wp_xmlrpc_server->output( $error->getXml() );
@@ -3294,8 +3300,11 @@
 	list( $message, $title, $r ) = _wp_die_process_input( $message, $title, $args );
 
 	// This is intentional. For backward-compatibility, support passing null here.
-	if ( ! headers_sent() && null !== $args['response'] ) {
-		status_header( $r['response'] );
+	if ( ! headers_sent() ) {
+	    if( null !== $args['response'] ) {
+			status_header( $r['response'] );
+		}
+		nocache_headers();
 	}
 
 	if ( is_scalar( $message ) ) {
