How to add a do_action on refreshing of WP customizer?

Got the solution:

  1. Create a PHP file “purge-bb-cache.php”
  2. Create a JS script like below in functions.php

purge-bb-cache.php

<?php 
  FLBuilderModel::delete_asset_cache_for_all_posts();
 ?>

JS script:

// Add JS to customizer
function print_customizer_js() {     
?>
<script>

// Purge BB Cache On Save Customizer
jQuery(document).ready(function(){
jQuery("input#save").click(function(){
//var ajaxurl = "<?php echo ( get_stylesheet_directory() . '/wp-content/themes/bb-theme-child/script.php' ); ?>";

jQuery.ajax({
type: 'POST',
url: '/wp-content/themes/bb-theme-child/assets/purge-bb-cache.php',
success: function(data) {
console.log("Purged BB Cache");
}
});
});
});
</script>
<?php
}
add_action('customize_controls_print_scripts', 'print_customizer_js');