| Server IP : 104.21.21.239 / Your IP : 216.73.216.11 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/home2/domains/old.davlermedia.com/wp-content/w3-total-cache/ |
Upload File : |
<?php
namespace W3TC;
/**
* CDN cache purge object
*/
/**
* class Cdn_CacheFlush
*/
class Cdn_CacheFlush {
/**
* Advanced cache config
*/
var $_config = null;
/**
* Array of urls to flush
*
* @var array
*/
private $flush_operation_requested = false;
/**
* PHP5 Constructor
*/
function __construct() {
$this->_config = Dispatcher::config();
}
/**
* Purges everything from CDNs that supports it
*/
function purge_all() {
$this->flush_operation_requested = true;
return true;
}
/**
* Purge a single url
*
* @param unknown $url
*/
function purge_url( $url ) {
$common = Dispatcher::component( 'Cdn_Core' );
$results = array();
$files = array();
$parsed = parse_url( $url );
$local_site_path = isset( $parsed['path'] )? ltrim( $parsed['path'], '/' ) : '';
$remote_path = $common->uri_to_cdn_uri( $local_site_path );
$files[] = $common->build_file_descriptor( $local_site_path, $remote_path );
$this->_flushed_urls[] = $url;
$common->purge( $files, $results );
}
/**
* Clears global and repeated urls
*/
function purge_post_cleanup() {
if ( $this->flush_operation_requested ) {
$common = Dispatcher::component( 'Cdn_Core' );
$results = array();
$common->purge_all( $results );
$count = 999;
$this->flush_operation_requested = false;
}
return $count;
}
}