removing unneeded { left in the code accidentally and which prevented WordPress SVN commit
This commit is contained in:
parent
ef4baf95c6
commit
8eab1f88ce
1 changed files with 9 additions and 6 deletions
|
@ -26,7 +26,7 @@ if (defined('SID') && SID != '')
|
||||||
$wp_ffpc_uri = $_SERVER['REQUEST_URI'];
|
$wp_ffpc_uri = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
/* no cache for uri with query strings, things usually go bad that way */
|
/* 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;
|
return false;
|
||||||
|
|
||||||
/* no cache for pages starting with /wp- like WP admin */
|
/* no cache for pages starting with /wp- like WP admin */
|
||||||
|
@ -38,8 +38,7 @@ if ( stripos($wp_ffpc_uri, 'robots.txt') )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* multisite files can be too large for memcached */
|
/* multisite files can be too large for memcached */
|
||||||
if ( function_exists('is_multisite') && stripos($wp_ffpc_uri, '/files/') )
|
if ( function_exists('is_multisite') && stripos($wp_ffpc_uri, '/files/') && is_multisite() )
|
||||||
if ( is_multisite() )
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* check if config is network active: use network config */
|
/* check if config is network active: use network config */
|
||||||
|
@ -125,13 +124,16 @@ foreach ( $wp_ffpc_keys as $internal => $key ) {
|
||||||
/* serve cache 404 status */
|
/* serve cache 404 status */
|
||||||
if ( isset( $wp_ffpc_values['meta']['status'] ) && $wp_ffpc_values['meta']['status'] == 404 ) {
|
if ( isset( $wp_ffpc_values['meta']['status'] ) && $wp_ffpc_values['meta']['status'] == 404 ) {
|
||||||
header("HTTP/1.1 404 Not Found");
|
header("HTTP/1.1 404 Not Found");
|
||||||
// flush();
|
/* if I kill the page serving here, the 404 page will not be showed at all, so we do not do that
|
||||||
// die();
|
* flush();
|
||||||
|
* die();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* server redirect cache */
|
/* server redirect cache */
|
||||||
if ( isset( $wp_ffpc_values['meta']['redirect'] ) && $wp_ffpc_values['meta']['redirect'] ) {
|
if ( isset( $wp_ffpc_values['meta']['redirect'] ) && $wp_ffpc_values['meta']['redirect'] ) {
|
||||||
header('Location: ' . $wp_ffpc_values['meta']['redirect'] );
|
header('Location: ' . $wp_ffpc_values['meta']['redirect'] );
|
||||||
|
/* cut the connection as fast as possible */
|
||||||
flush();
|
flush();
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -142,6 +144,7 @@ if ( array_key_exists( "HTTP_IF_MODIFIED_SINCE" , $_SERVER ) && !empty( $wp_ffpc
|
||||||
/* check is cache is still valid */
|
/* check is cache is still valid */
|
||||||
if ( $if_modified_since >= $wp_ffpc_values['meta']['lastmodified'] ) {
|
if ( $if_modified_since >= $wp_ffpc_values['meta']['lastmodified'] ) {
|
||||||
header("HTTP/1.0 304 Not Modified");
|
header("HTTP/1.0 304 Not Modified");
|
||||||
|
/* connection cut for faster serving */
|
||||||
flush();
|
flush();
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue