/** * WP Recache admin-bar / settings actions. * * @package WP_Recache */ function wpRecachePurgeAll() { if (!confirm('Are you sure you want to purge all cache?')) { return; } jQuery.post(wpRecache.ajaxUrl, { action: 'wp_recache_purge_all', nonce: wpRecache.nonce }, function (response) { if (response.success) { alert('Cache purged successfully'); location.reload(); } else { alert('Error: ' + response.data); } }); }