wp-super-cache
Last commit date
languages
13 years ago
plugins
10 years ago
Changelog.txt
10 years ago
advanced-cache.php
11 years ago
ossdl-cdn.php
11 years ago
readme.txt
10 years ago
wp-cache-base.php
10 years ago
wp-cache-config-sample.php
11 years ago
wp-cache-phase1.php
10 years ago
wp-cache-phase2.php
10 years ago
wp-cache.php
10 years ago
wp-super-cache.pot
12 years ago
wp-cache-base.php
32 lines
| 1 | <?php |
| 2 | $known_headers = array("Last-Modified", "Expires", "Content-Type", "Content-type", "X-Pingback", "ETag", "Cache-Control", "Pragma"); |
| 3 | |
| 4 | $WPSC_HTTP_HOST = htmlentities( $_SERVER[ 'HTTP_HOST' ] ); |
| 5 | |
| 6 | // We want to be able to identify each blog in a WordPress MU install |
| 7 | $blogcacheid = ''; |
| 8 | if ( defined( 'VHOST' ) || ( defined( 'WP_ALLOW_MULTISITE' ) && constant( 'WP_ALLOW_MULTISITE' ) == true ) ) { |
| 9 | $blogcacheid = 'blog'; // main blog |
| 10 | if( defined( 'SUBDOMAIN_INSTALL' ) && constant( 'SUBDOMAIN_INSTALL' ) == true ) { |
| 11 | $blogcacheid = $WPSC_HTTP_HOST; |
| 12 | } else { |
| 13 | if ( isset( $base ) == false ) |
| 14 | $base = ''; |
| 15 | $request_uri = str_replace( '..', '', preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $_SERVER['REQUEST_URI'] ) ); |
| 16 | if( strpos( $request_uri, '/', 1 ) ) { |
| 17 | if( $base == '/' ) { |
| 18 | $blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 ); |
| 19 | } else { |
| 20 | $blogcacheid = str_replace( $base, '', $request_uri ); |
| 21 | if ( $blogcacheid != '' ) |
| 22 | $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) ); |
| 23 | } |
| 24 | if ( '/' == substr($blogcacheid, -1)) |
| 25 | $blogcacheid = substr($blogcacheid, 0, -1); |
| 26 | } |
| 27 | $blogcacheid = str_replace( '/', '', $blogcacheid ); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | ?> |
| 32 |