Server IP : 192.64.118.117 / Your IP : 18.191.171.178 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/tcrgfinancesuite.com/wp-content/plugins/w3-total-cache/ |
Upload File : |
<?php namespace W3TC; class Cdnfsd_CloudFront_Engine { private $access_key; private $secret_key; private $distribution_id; function __construct( $config = array() ) { $this->access_key = $config['access_key']; $this->secret_key = $config['secret_key']; $this->distribution_id = $config['distribution_id']; } function flush_urls( $urls ) { if ( empty( $this->access_key ) || empty( $this->secret_key ) || empty( $this->distribution_id ) ) throw new \Exception( __( 'Access key not specified.', 'w3-total-cache' ) ); $api = new Cdnfsd_CloudFront_Api( $this->access_key, $this->secret_key ); $uris = array(); foreach ( $urls as $url ) { $parsed = parse_url( $url ); $relative_url = ( isset( $parsed['path'] ) ? $parsed['path'] : '/' ) . ( isset( $parsed['query'] ) ? '?' . $parsed['query'] : '' ); $uris[] = $relative_url; } $api->invalidation_create( $this->distribution_id, $uris ); } /** * Flushes CDN completely */ function flush_all() { if ( empty( $this->access_key ) || empty( $this->secret_key ) || empty( $this->distribution_id ) ) throw new \Exception( __( 'Access key not specified.', 'w3-total-cache' ) ); $api = new Cdnfsd_CloudFront_Api( $this->access_key, $this->secret_key ); $uris = array( '/*' ); $api->invalidation_create( $this->distribution_id, $uris ); } }