removing unneeded { left in the code accidentally and which prevented WordPress SVN commit
Peter Molnar hello@petermolnar.eu
Thu, 04 Sep 2014 10:49:14 +0100
1 files changed,
9 insertions(+),
6 deletions(-)
jump to
M
wp-ffpc-acache.php
→
wp-ffpc-acache.php
@@ -26,7 +26,7 @@ /* request uri */
$wp_ffpc_uri = $_SERVER['REQUEST_URI']; /* no cache for uri with query strings, things usually go bad that way */ -if ( isset($wp_ffpc_config['nocache_dyn']) && !empty($wp_ffpc_config['nocache_dyn']) && stripos($wp_ffpc_uri, '?') !== false ) { +if ( isset($wp_ffpc_config['nocache_dyn']) && !empty($wp_ffpc_config['nocache_dyn']) && stripos($wp_ffpc_uri, '?') !== false ) return false; /* no cache for pages starting with /wp- like WP admin */@@ -38,9 +38,8 @@ if ( stripos($wp_ffpc_uri, 'robots.txt') )
return false; /* multisite files can be too large for memcached */ -if ( function_exists('is_multisite') && stripos($wp_ffpc_uri, '/files/') ) - if ( is_multisite() ) - return false; +if ( function_exists('is_multisite') && stripos($wp_ffpc_uri, '/files/') && is_multisite() ) + return false; /* check if config is network active: use network config */ if (!empty ( $wp_ffpc_config['network'] ) )@@ -125,13 +124,16 @@
/* serve cache 404 status */ if ( isset( $wp_ffpc_values['meta']['status'] ) && $wp_ffpc_values['meta']['status'] == 404 ) { header("HTTP/1.1 404 Not Found"); -// flush(); -// die(); + /* if I kill the page serving here, the 404 page will not be showed at all, so we do not do that + * flush(); + * die(); + */ } /* server redirect cache */ if ( isset( $wp_ffpc_values['meta']['redirect'] ) && $wp_ffpc_values['meta']['redirect'] ) { header('Location: ' . $wp_ffpc_values['meta']['redirect'] ); + /* cut the connection as fast as possible */ flush(); die(); }@@ -142,6 +144,7 @@ $if_modified_since = strtotime(preg_replace('/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"]));
/* check is cache is still valid */ if ( $if_modified_since >= $wp_ffpc_values['meta']['lastmodified'] ) { header("HTTP/1.0 304 Not Modified"); + /* connection cut for faster serving */ flush(); die(); }