Files
medicalalert-web-reloaded/wp/wp-content/mu-plugins/cache-control.php
Rachit Bhargava 5d0f0734d8 first commit
2023-07-21 17:12:10 -04:00

21 lines
411 B
PHP
Executable File

<?php
/*
* Exclude Campaign cron from cache
*/
$regex_path_patterns = array(
'#^/iper_cron/?#',
);
foreach ($regex_path_patterns as $regex_path_pattern) {
if (preg_match($regex_path_pattern, $_SERVER['REQUEST_URI'])) {
add_action( 'send_headers', 'add_header_nocache', 15 );
break;
}
}
function add_header_nocache() {
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
}