The issue is related to the URL - https://wpcwv.com/sales_engineer/
In Page Rules, I have set -
*.wpcwv.com/*
Cache Level: Cache Everything, Origin Cache Control: On
The PHP Headers are set as -
add_filter(
'wp_headers',
function ( $headers ) {
if ( (! is_user_logged_in()) ) {
$headers['Cache-Control'] = 'public, max-age=2592000';
$headers['Expires'] = gmdate( 'D, d M Y H:i:s', time() + 2592000 );
} else {
$headers['Cache-Control'] = 'private, no-cache';
}
return $headers;
}
);
Even after this, the response headers I am getting are:
date: Fri, 20 Aug 2021 12:50:31 GMT
content-type: text/html; charset=UTF-8
cache-control: public, max-age=2592000
expires: Sun, 19 Sep 2021 12:50:30
vary: Accept-Encoding
cf-cache-status: DYNAMIC
nel: {“success_fraction”:0,“report_to”:“cf-nel”,“max_age”:604800}
server: cloudflare
cf-ray: 681bbf679ee2d6b5-FRA
content-encoding: br
alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400
:status: 200
What changes I have to make to get cf-cache-status: HIT?
Thanks in advance.
Note: I have removed the links from the response header pasted here due to the restrictions in number of links.