diff --git a/wp-content/plugins/wp-super-cache/advanced-cache.php b/wp-content/plugins/wp-super-cache/advanced-cache.php
index f7718b07f68c54104e6c758e0fd46c2c47be6efc..7459c0bbbb0d56a2c83640f1ba857a2bb92de486 100644
--- a/wp-content/plugins/wp-super-cache/advanced-cache.php
+++ b/wp-content/plugins/wp-super-cache/advanced-cache.php
@@ -8,8 +8,9 @@ function wpcache_broken_message() {
 	$doing_ajax =     defined( 'DOING_AJAX' ) && DOING_AJAX;
 	$xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST;
 	$rest_request =   defined( 'REST_REQUEST' ) && REST_REQUEST;
+	$robots_request = strpos( $_SERVER[ 'REQUEST_URI' ], 'robots.txt' ) != false;
 
-	$skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request );
+	$skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request || $robots_request);
 	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) && !$skip_output ) {
 		echo "<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->";
 	}
diff --git a/wp-content/plugins/wp-super-cache/ossdl-cdn.php b/wp-content/plugins/wp-super-cache/ossdl-cdn.php
index 20934b4097c6db71d20ee37f428e0a0a1a3b5933..0c5bd5f15a1276f2d07a19f9447d6d8f19ef846b 100644
--- a/wp-content/plugins/wp-super-cache/ossdl-cdn.php
+++ b/wp-content/plugins/wp-super-cache/ossdl-cdn.php
@@ -4,8 +4,10 @@
 
 /* Set up some defaults */
 if ( get_option( 'ossdl_off_cdn_url' ) == false )
-	add_option('ossdl_off_cdn_url', get_option('siteurl'));
-$ossdl_off_blog_url = get_option('siteurl');
+	add_option( 'ossdl_off_cdn_url', get_option( 'siteurl' ) );
+if ( get_option( 'ossdl_off_blog_url' ) == false )
+	add_option( 'ossdl_off_blog_url', apply_filters( 'ossdl_off_blog_url', untrailingslashit( get_option( 'siteurl' ) ) ) );
+$ossdl_off_blog_url = get_option( 'ossdl_off_blog_url' );
 $ossdl_off_cdn_url = trim( get_option('ossdl_off_cdn_url') );
 if ( get_option( 'ossdl_off_include_dirs' ) == false )
 	add_option('ossdl_off_include_dirs', 'wp-content,wp-includes');
@@ -20,7 +22,7 @@ if ( !is_array( $arr_of_excludes ) )
 if ( get_option( 'ossdl_cname' ) == false )
 	add_option('ossdl_cname', '');
 $ossdl_cname = trim(get_option('ossdl_cname'));
-$ossdl_https = trim(get_option('ossdl_https'));
+$ossdl_https = intval(get_option('ossdl_https'));
 $arr_of_cnames = array_map('trim', explode(',', $ossdl_cname));
 if ($arr_of_cnames[0] == '') $arr_of_cnames = array();
 
@@ -123,12 +125,14 @@ if ( false == isset( $ossdlcdn ) )
 if ( $ossdlcdn == 1 )
 	add_action('init', 'do_scossdl_off_ob_start');
 
-function scossdl_off_options() {
+function scossdl_off_update() {
 	global $ossdlcdn, $wp_cache_config_file;
 
 	$valid_nonce = isset($_REQUEST['_wpnonce']) ? wp_verify_nonce($_REQUEST['_wpnonce'], 'wp-cache') : false;
+
 	if ( $valid_nonce && isset($_POST['action']) && ( $_POST['action'] == 'update_ossdl_off' )){
-		update_option('ossdl_off_cdn_url', $_POST['ossdl_off_cdn_url']);
+		update_option( 'ossdl_off_cdn_url', untrailingslashit( $_POST[ 'ossdl_off_cdn_url' ] ) );
+		update_option( 'ossdl_off_blog_url', untrailingslashit( $_POST[ 'ossdl_off_blog_url' ] ) );
 		update_option('ossdl_off_include_dirs', $_POST['ossdl_off_include_dirs'] == '' ? 'wp-content,wp-includes' : $_POST['ossdl_off_include_dirs']);
 		update_option('ossdl_off_exclude', $_POST['ossdl_off_exclude']);
 		update_option('ossdl_cname', $_POST['ossdl_cname']);
@@ -142,26 +146,45 @@ function scossdl_off_options() {
 		}
 		wp_cache_replace_line('^ *\$ossdlcdn', "\$ossdlcdn = $ossdlcdn;", $wp_cache_config_file);
 	}
+}
+
+function scossdl_off_options() {
+	global $ossdlcdn, $wp_cache_config_file, $ossdl_off_blog_url;
+
+	scossdl_off_update();
+
 	$example_cdn_uri = str_replace( 'http://', 'http://cdn.', str_replace( 'www.', '', get_option( 'siteurl' ) ) );
 	$example_cnames  = str_replace( 'http://cdn.', 'http://cdn1.', $example_cdn_uri );
 	$example_cnames .= ',' . str_replace( 'http://cdn.', 'http://cdn2.', $example_cdn_uri );
 	$example_cnames .= ',' . str_replace( 'http://cdn.', 'http://cdn3.', $example_cdn_uri );
 
-	$example_cdn_uri = get_option('ossdl_off_cdn_url') == get_option('siteurl') ? $example_cdn_uri : get_option('ossdl_off_cdn_url');
-	$example_cdn_uri .= '/wp-includes/js/prototype.js';
+	$example_cdn_uri = get_option('ossdl_off_cdn_url') == get_option( 'siteurl' ) ? $example_cdn_uri : get_option('ossdl_off_cdn_url');
+	$example_cdn_uri .= '/wp-includes/js/jquery/jquery-migrate.js';
 	?>
-		<p><?php _e( 'Your website probably uses lots of static files. Image, Javascript and CSS files are usually static files that could just as easily be served from another site or CDN. Therefore, this plugin replaces any links in the <code>wp-content</code> and <code>wp-includes</code> directories (except for PHP files) on your site with the URL you provide below. That way you can either copy all the static content to a dedicated host or mirror the files to a CDN by <a href="http://knowledgelayer.softlayer.com/questions/365/How+does+Origin+Pull+work%3F" target="_blank">origin pull</a>.', 'wp-super-cache' ); ?></p>
+		<p><?php _e( 'Your website probably uses lots of static files. Image, Javascript and CSS files are usually static files that could just as easily be served from another site or CDN. Therefore, this plugin replaces any links in the <code>wp-content</code> and <code>wp-includes</code> directories (except for PHP files) on your site with the URL you provide below. That way you can either copy all the static content to a dedicated host or mirror the files to a CDN by <a href="https://knowledgelayer.softlayer.com/faq/how-does-origin-pull-work" target="_blank">origin pull</a>.', 'wp-super-cache' ); ?></p>
 		<p><?php printf( __( '<strong style="color: red">WARNING:</strong> Test some static urls e.g., %s  to ensure your CDN service is fully working before saving changes.', 'wp-super-cache' ), '<code>' . $example_cdn_uri . '</code>' ); ?></p>
+
+	<?php if ( $ossdl_off_blog_url != get_home_url() ) { ?>
+		<p><?php printf( __( '<strong style="color: red">WARNING:</strong> Your siteurl and homeurl are different. The plugin is using %s as the homepage URL of your site but if that is wrong please use the filter "ossdl_off_blog_url" to fix it.', 'wp-super-cache' ), '<code>' . $ossdl_off_blog_url . '</code>' ); ?></p>
+	<?php } ?> 
+
 		<p><?php _e( 'You can define different CDN URLs for each site on a multsite network.', 'wp-super-cache' ); ?></p>
 		<p><form method="post" action="">
 		<?php wp_nonce_field('wp-cache'); ?>
-		<table class="form-table"><tbod>
+		<table class="form-table"><tbody>
 			<tr valign="top">
 				<td style='text-align: right'>
 					<input id='ossdlcdn' type="checkbox" name="ossdlcdn" value="1" <?php if ( $ossdlcdn ) echo "checked=1"; ?> />
 				</td>
 				<th scope="row"><label for="ossdlcdn"><?php _e( 'Enable CDN Support', 'wp-super-cache' ); ?></label></th>
 			</tr>
+			<tr valign="top">
+				<th scope="row"><label for="ossdl_off_cdn_url"><?php _e( 'Site URL', 'wp-super-cache' ); ?></label></th>
+				<td>
+					<input type="text" name="ossdl_off_blog_url" value="<?php echo esc_url( untrailingslashit( get_option( 'ossdl_off_blog_url' ) ) ); ?>" size="64" class="regular-text code" /><br />
+					<span class="description"><?php _e( 'The URL of your site. No trailing <code>/</code> please.', 'wp-super-cache' ); ?></span>
+				</td>
+			</tr>
 			<tr valign="top">
 				<th scope="row"><label for="ossdl_off_cdn_url"><?php _e( 'Off-site URL', 'wp-super-cache' ); ?></label></th>
 				<td>
@@ -180,7 +203,7 @@ function scossdl_off_options() {
 				<th scope="row"><label for="ossdl_off_exclude"><?php _e( 'Exclude if substring', 'wp-super-cache' ); ?></label></th>
 				<td>
 					<input type="text" name="ossdl_off_exclude" value="<?php echo esc_attr( get_option( 'ossdl_off_exclude' ) ); ?>" size="64" class="regular-text code" /><br />
-					<span class="description"><?php _e( 'Excludes something from being rewritten if one of the above strings is found in the match. Use a comma as the delimiter like this, <code>.php, .flv, .do</code>, and always include <code>.php</code> (default).', 'wp-super-cache' ); ?></span>
+					<span class="description"><?php _e( 'Excludes something from being rewritten if one of the above strings is found in the URL. Use a comma as the delimiter like this, <code>.php, .flv, .do</code>, and always include <code>.php</code> (default).', 'wp-super-cache' ); ?></span>
 				</td>
 			</tr>
 			<tr valign="top">
@@ -195,7 +218,7 @@ function scossdl_off_options() {
 			</tr>
 		</tbody></table>
 		<input type="hidden" name="action" value="update_ossdl_off" />
-		<p class="submit"><input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" /></p>
+		<p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'wp-super-cache' ) ?>" /></p>
 		</form></p>
 		<p><?php _e( 'CDN functionality provided by <a href="http://wordpress.org/plugins/ossdl-cdn-off-linker/">OSSDL CDN Off Linker</a> by <a href="http://mark.ossdl.de/">Mark Kubacki</a>', 'wp-super-cache' ); ?></p>
 	<?php
diff --git a/wp-content/plugins/wp-super-cache/plugins/awaitingmoderation.php b/wp-content/plugins/wp-super-cache/plugins/awaitingmoderation.php
index 1c0df32bda2e9c25e8a19d490fb094383eea86e9..a6185be9f8338b158cf5b30eb7545dc7bb223a7e 100644
--- a/wp-content/plugins/wp-super-cache/plugins/awaitingmoderation.php
+++ b/wp-content/plugins/wp-super-cache/plugins/awaitingmoderation.php
@@ -1,7 +1,7 @@
 <?php
 
 function awaitingmoderation_action( $buffer ) {
-	$buffer = str_replace( __( 'Your comment is awaiting moderation.' ), '', $buffer );
+	$buffer = str_replace( __( 'Your comment is awaiting moderation.', 'wp-super-cache' ), '', $buffer );
 	return $buffer;
 }
 
@@ -37,9 +37,9 @@ function wp_supercache_awaitingmoderation_admin() {
 		<?php
 		if ($changed) {
 			if ( $cache_awaitingmoderation )
-				$status = __( "enabled" );
+				$status = __( "enabled", 'wp-super-cache' );
 			else
-				$status = __( "disabled" );
+				$status = __( "disabled", 'wp-super-cache' );
 			echo "<p><strong>" . sprintf( __( "Awaiting Moderation is now %s", 'wp-super-cache' ), $status ) . "</strong></p>";
 		}
 	echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
diff --git a/wp-content/plugins/wp-super-cache/plugins/badbehaviour.php b/wp-content/plugins/wp-super-cache/plugins/badbehaviour.php
index f02ba12f0fe47121324a86fac50670f7d1f3e763..4f42d1a4d12f3d0df7d359e52c81e51d05b0e9dc 100644
--- a/wp-content/plugins/wp-super-cache/plugins/badbehaviour.php
+++ b/wp-content/plugins/wp-super-cache/plugins/badbehaviour.php
@@ -65,12 +65,12 @@ function wp_supercache_badbehaviour_admin() {
 		<label><input type="radio" name="cache_badbehaviour" value="1" <?php if( $cache_badbehaviour ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Enabled', 'wp-super-cache' ); ?></label>
 		<label><input type="radio" name="cache_badbehaviour" value="0" <?php if( !$cache_badbehaviour ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Disabled', 'wp-super-cache' ); ?></label>
 		<p><?php _e( '', 'wp-super-cache' ); ?></p><?php
-		echo '<p>' . sprintf( __( '(Only legacy caching supported, disabled compression and requires <a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> in "%s/plugins/bad-behavior/") ', 'wp-super-cache' ), WP_CONTENT_DIR ) . '</p>';
+		echo '<p>' . sprintf( __( '(Only WPCache caching supported, disabled compression and requires <a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> in "%s/plugins/bad-behavior/") ', 'wp-super-cache' ), WP_CONTENT_DIR ) . '</p>';
 		if ( isset( $changed ) && $changed ) {
 			if ( $cache_badbehaviour )
-				$status = __( "enabled" );
+				$status = __( "enabled", 'wp-super-cache' );
 			else
-				$status = __( "disabled" );
+				$status = __( "disabled", 'wp-super-cache' );
 			echo "<p><strong>" . sprintf( __( "Bad Behavior support is now %s", 'wp-super-cache' ), $status ) . "</strong></p>";
 		}
 	echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
diff --git a/wp-content/plugins/wp-super-cache/plugins/domain-mapping.php b/wp-content/plugins/wp-super-cache/plugins/domain-mapping.php
index 7babbebd41f273efd04e25aa6acd22d96af35385..e5f381c0edebba970c6ed7876641c2ed91a74d4a 100644
--- a/wp-content/plugins/wp-super-cache/plugins/domain-mapping.php
+++ b/wp-content/plugins/wp-super-cache/plugins/domain-mapping.php
@@ -78,9 +78,9 @@ function wp_supercache_domain_mapping_admin() {
 		echo '<p>' . __( 'Provides support for <a href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/">Domain Mapping</a> plugin to map multiple domains to a blog.', 'wp-super-cache' ) . '</p>';
 		if ( isset( $changed ) && $changed ) {
 			if ( $cache_domain_mapping )
-				$status = __( "enabled" );
+				$status = __( "enabled", 'wp-super-cache' );
 			else
-				$status = __( "disabled" );
+				$status = __( "disabled", 'wp-super-cache' );
 			echo "<p><strong>" . sprintf( __( "Domain Mapping support is now %s", 'wp-super-cache' ), $status ) . "</strong></p>";
 		}
 	echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
@@ -93,7 +93,7 @@ function wp_supercache_domain_mapping_admin() {
 add_cacheaction( 'cache_admin_page', 'wp_supercache_domain_mapping_admin' );
 
 function wp_supercache_domain_mapping_notice() {
-	global $cache_enabled, $cache_domain_mapping;
+	global $cache_enabled;
 	if( $cache_enabled )
 		echo '<div class="error"><p><strong>' . __('Domain Mapping plugin detected! Please go to the Supercache plugins page and enable the domain mapping helper plugin.', 'wp-super-cache' ) . '</strong></p></div>';
 }
diff --git a/wp-content/plugins/wp-super-cache/plugins/jetpack.php b/wp-content/plugins/wp-super-cache/plugins/jetpack.php
index 878acfffa52951bca8500c51bfb327ae341373c1..1c398c6dae1e99536eb23f3729e29e275330315c 100644
--- a/wp-content/plugins/wp-super-cache/plugins/jetpack.php
+++ b/wp-content/plugins/wp-super-cache/plugins/jetpack.php
@@ -25,7 +25,7 @@ function wp_super_cache_jetpack_admin() {
 	<h4><?php _e( 'Jetpack Mobile Theme', 'wp-super-cache' ); ?></h4>
 	<?php
 	if ( false == file_exists( dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php' ) ) {
-		echo "<strong>" . sprintf( __( "Jetpack not found in %s. Install it and enable the mobile theme and this helper plugin to cache visits by mobile visitors." ), dirname( WPCACHEHOME ) ) . "</strong>";
+		echo "<strong>" . sprintf( __( "Jetpack not found in %s. Install it and enable the mobile theme and this helper plugin to cache visits by mobile visitors.", 'wp-super-cache' ), dirname( WPCACHEHOME ) ) . "</strong>";
 	} else { ?>
 		<form name="wp_manager" action="" method="post">
 		<label><input type="radio" name="cache_jetpack" value="1" <?php if( $cache_jetpack ) { echo 'checked="checked" '; } ?>/> <?php _e( 'Enabled', 'wp-super-cache' ); ?></label>
@@ -34,9 +34,9 @@ function wp_super_cache_jetpack_admin() {
 		echo '<p>' . __( 'Provides support for the <a href="http://wordpress.org/extend/plugins/jetpack/">Jetpack</a> mobile theme and plugin. PHP caching mode and mobile support will be enabled too.', 'wp-super-cache' ) . '</p>';
 		if ( isset( $changed ) && $changed ) {
 			if ( $cache_jetpack )
-				$status = __( "enabled" );
+				$status = __( "enabled", 'wp-super-cache' );
 			else
-				$status = __( "disabled" );
+				$status = __( "disabled", 'wp-super-cache' );
 			echo "<p><strong>" . sprintf( __( "Jetpack Mobile Theme support is now %s", 'wp-super-cache' ), $status ) . "</strong></p>";
 		}
 		echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
@@ -50,16 +50,24 @@ function wp_super_cache_jetpack_admin() {
 add_cacheaction( 'cache_admin_page', 'wp_super_cache_jetpack_admin' );
 
 function wp_super_cache_jetpack_cookie_check( $cache_key ) {
-	if ( file_exists( dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php' ) ) {
-		if ( function_exists( "jetpack_is_mobile" ) == false )
-			include( dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php' );
+	if ( function_exists( "jetpack_is_mobile" ) == false ) {
 
+		if ( file_exists( dirname( WPCACHEHOME ) . '/jetpack-dev/class.jetpack-user-agent.php' ) ) {
+			wp_cache_debug( "wp_super_cache_jetpack_cookie_check: jetpack dev detected. Returning 'normal' to avoid loading Jetpack." );
+			return "normal";
+		} elseif ( file_exists( dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php' ) ) {
+			include_once( dirname( WPCACHEHOME ) . '/jetpack/class.jetpack-user-agent.php' );
+		} else {
+			wp_cache_debug( "wp_super_cache_jetpack_cookie_check: jetpack UA file not found." );
+		}
+	}
+
+	if ( function_exists( "jetpack_is_mobile" ) ) {
 		if ( jetpack_is_mobile() )
 			return 'mobile';
 		else
 			return 'normal';
 	} else {
-		wp_cache_debug( "wp_super_cache_jetpack_cookie_check: jetpack UA file not found." );
 		return "normal";
 	}
 }
diff --git a/wp-content/plugins/wp-super-cache/plugins/searchengine.php b/wp-content/plugins/wp-super-cache/plugins/searchengine.php
index ca9ba8df51e7fd9d37e140570f27a039bdf23f6a..bac62f5cd30dece50893b93304706941f8f52ba9 100644
--- a/wp-content/plugins/wp-super-cache/plugins/searchengine.php
+++ b/wp-content/plugins/wp-super-cache/plugins/searchengine.php
@@ -41,7 +41,6 @@ function searchenginesupercache( $user_info ) {
 	} else {
 		return false;
 	}
-	return $user_info;
 }
 
 function searchengine_phase2_actions() {
@@ -72,9 +71,9 @@ function wp_supercache_searchengine_admin() {
 		echo '<p>' . __( 'Provides support for <a href="http://ocaoimh.ie/no-adverts-for-friends/">No Adverts for Friends</a>.', 'wp-super-cache' ) . '</p>';
 		if ( isset( $changed ) && $changed ) {
 			if ( 'yes' == $cache_no_adverts_for_friends )
-				$status = __( "enabled" );
+				$status = __( "enabled", 'wp-super-cache' );
 			else
-				$status = __( "disabled" );
+				$status = __( "disabled", 'wp-super-cache' );
 			echo "<p><strong>" . sprintf( __( "No Adverts for Friends support is now %s", 'wp-super-cache' ), $status ) . "</strong></p>";
 		}
 	echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
diff --git a/wp-content/plugins/wp-super-cache/plugins/wptouch.php b/wp-content/plugins/wp-super-cache/plugins/wptouch.php
index 875f764dd6bf97c92f3a060c5c4d8da79e819813..744d7efbba744e4b4082b56c9bcd369a757de895 100644
--- a/wp-content/plugins/wp-super-cache/plugins/wptouch.php
+++ b/wp-content/plugins/wp-super-cache/plugins/wptouch.php
@@ -25,9 +25,9 @@ function wp_super_cache_wptouch_admin() {
 		echo '<p>' . __( 'Provides support for <a href="http://wordpress.org/extend/plugins/wptouch/">WPTouch</a> mobile theme and plugin.', 'wp-super-cache' ) . '</p>';
 		if ( isset( $changed ) && $changed ) {
 			if ( $cache_wptouch )
-				$status = __( "enabled" );
+				$status = __( "enabled", 'wp-super-cache' );
 			else
-				$status = __( "disabled" );
+				$status = __( "disabled", 'wp-super-cache' );
 			echo "<p><strong>" . sprintf( __( "WPTouch support is now %s", 'wp-super-cache' ), $status ) . "</strong></p>";
 		}
 	echo '<div class="submit"><input class="button-primary" ' . SUBMITDISABLED . 'type="submit" value="' . __( 'Update', 'wp-super-cache' ) . '" /></div>';
@@ -40,7 +40,7 @@ function wp_super_cache_wptouch_admin() {
 add_cacheaction( 'cache_admin_page', 'wp_super_cache_wptouch_admin' );
 
 function wp_super_cache_wptouch_notice() {
-	global $cache_enabled, $cache_wptouch;
+	global $cache_enabled;
 	if( $cache_enabled )
 		echo '<div class="error"><p><strong>' . __('WPTouch plugin detected! Please go to the Supercache plugins page and enable the WPTouch helper plugin.', 'wp-super-cache' ) . '</strong></p></div>';
 }
@@ -80,7 +80,7 @@ function wp_super_cache_maybe_disable_wptouch( $t ) {
 add_cacheaction( 'disable_mobile_check', 'wp_super_cache_maybe_disable_wptouch' );
 
 function wp_super_cache_wptouch_browsers( $browsers ) {
-	global $cache_wptouch, $wptouch_exclude_ua, $wp_cache_config_file;
+	global $wptouch_exclude_ua, $wp_cache_config_file;
 
 	if ( false == function_exists( 'bnc_wptouch_get_exclude_user_agents' ) || false == function_exists( 'bnc_wptouch_get_user_agents' ) )
 		return $browsers;
diff --git a/wp-content/plugins/wp-super-cache/readme.txt b/wp-content/plugins/wp-super-cache/readme.txt
index 9c9666dd478c4026dfd5a9645bdc0017027ba695..9b67a1d39f710e67ab7d2c76656ea82968e033e9 100644
--- a/wp-content/plugins/wp-super-cache/readme.txt
+++ b/wp-content/plugins/wp-super-cache/readme.txt
@@ -1,8 +1,8 @@
 === WP Super Cache ===
 Contributors: donncha, automattic, kraftbj
 Tags: performance,caching,wp-cache,wp-super-cache,cache
-Tested up to: 4.7.3
-Stable tag: 1.4.9
+Tested up to: 4.8.1
+Stable tag: 1.5.4
 Requires at least: 3.0
 
 A very fast caching engine for WordPress that produces static html files.
@@ -10,58 +10,100 @@ A very fast caching engine for WordPress that produces static html files.
 == Description ==
 This plugin generates static html files from your dynamic WordPress blog.  After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.
 
-The static html files will be served to the vast majority of your users, but because a user's details are displayed in the comment form after they leave a comment those requests are handled by the legacy caching engine. Static files are served to:
+The static html files will be served to the vast majority of your users:
 
 1. Users who are not logged in.
 2. Users who have not left a comment on your blog.
 3. Or users who have not viewed a password protected post.
 
-99% of your visitors will be served static html files. Those users who don't see the static files will still benefit because they will see different cached files that aren't quite as efficient but still better than uncached. This plugin will help your server cope with a front page appearance on digg.com or other social networking site.
-
-If for some reason "supercaching" doesn't work on your server then don't worry. Caching will still be performed, but every request will require loading the PHP engine. In normal circumstances this isn't bad at all. Visitors to your site will notice no slowdown or difference. Supercache really comes into it's own if your server is underpowered, or you're experiencing heavy traffic.
-Super Cached html files will be served more quickly than PHP generated cached files but in every day use, the difference isn't noticeable.
+99% of your visitors will be served static html files. One cached file can be served thousands of times. Other visitors will be served custom cached files tailored to their visit. If they are logged in, or have left comments those details will be displayed and cached for them.
 
 The plugin serves cached files in 3 ways (ranked by speed):
 
-1. Mod_Rewrite. The fastest method is by using Apache mod_rewrite (or whatever similar module your web server supports) to serve "supercached" static html files. This completely bypasses PHP and is extremely quick. If your server is hit by a deluge of traffic it is more likely to cope as the requests are "lighter". This does require the Apache mod_rewrite module (which is probably installed if you have custom permalinks) and a modification of your .htaccess file. Visits by anonymous or unknown users will be served this way.
-2. PHP. Supercached static files can now be served by PHP. The plugin will serve a "supercached" file if it exists and it's almost as fast as the mod_rewrite method. It's easier to configure as the .htaccess file doesn't need to be changed. You still need a custom permalink. You can keep portions of your page dynamic in this caching mode. Your server may not cope as well with a really large amount of traffic. (You're gaming Digg aren't you? You'll need mod_rewrite, the rest of us are ok with PHP!)
-3. Legacy caching. This is mainly used to cache pages for known users. These are logged in users, visitors who leave comments or those who should be shown custom per-user data. It's the most flexible caching method but also the slowest. As each page is different it's often better not to cache pages for these users at all and avoid legacy caching. Legacy caching will also cache visits by unknown users if this caching mode is selected. You can have dynamic parts to your page in this mode too.
+1. Expert. The fastest method is by using Apache mod_rewrite (or whatever similar module your web server supports) to serve "supercached" static html files. This completely bypasses PHP and is extremely quick. If your server is hit by a deluge of traffic it is more likely to cope as the requests are "lighter". This does require the Apache mod_rewrite module (which is probably installed if you have custom permalinks) and a modification of your .htaccess file which is risky and may take down your site if modified incorrectly.
+2. Simple. Supercached static files can be served by PHP and this is the recommended way of using the plugin. The plugin will serve a "supercached" file if it exists and it's almost as fast as the mod_rewrite method. It's easier to configure as the .htaccess file doesn't need to be changed. You still need a custom permalink. You can keep portions of your page dynamic in this caching mode.
+3. WP-Cache caching. This is mainly used to cache pages for known users, URLs with parameters and feeds. Known users are logged in users, visitors who leave comments or those who should be shown custom per-user data. It's the most flexible caching method and slightly slower. WP-Cache caching will also cache visits by unknown users if supercaching is disabled. You can have dynamic parts to your page in this mode too. This mode is always enabled but you can disable caching for known users, URLs with parameters, or feeds separately. Set the constant "DISABLE_SUPERCACHE" to 1 in your wp-config.php if you want to only use WP-Cache caching.
 
-If you're new to caching use PHP caching. It's easy to set up and very fast. Avoid legacy caching if you can.
+If you're not comfortable with editing PHP files then use simple mode. It's easy to set up and very fast.
 
 = Recommended Settings =
-Advanced users will probably want to use mod_rewrite caching, but PHP caching is almost as good and recommended for everyone else. Enable the following:
 
-1. PHP caching.
+1. Simple caching.
 2. Compress pages.
 3. Don't cache pages for known users.
 4. Cache rebuild.
 5. CDN support.
 6. Extra homepage checks.
 
-Garbage collection is the act of cleaning up cache files that are out of date and stale. There's no correct value for the expiry time but a good starting point is 1800 seconds if you're not using legacy mode. If you are using that mode start with an expiry time of 600 seconds.
+Garbage collection is the act of cleaning up cache files that are out of date and stale. There's no correct value for the expiry time but a good starting point is 1800 seconds.
 
-If you are not using legacy mode caching consider deleting the contents of the "Rejected User Agents" text box and allow search engines to create supercache static files.
+Consider deleting the contents of the "Rejected User Agents" text box and allow search engines to cache files for you.
 
 Likewise, preload as many posts as you can and enable "Preload Mode". Garbage collection will still occur but it won't affect the preloaded files. If you don't care about sidebar widgets updating often set the preload interval to 2880 minutes (2 days) so all your posts aren't recached very often. When the preload occurs the cache files for the post being refreshed is deleted and then regenerated. Afterwards a garbage collection of all old files is performed to clean out stale cache files.
-With preloading on cached files will still be deleted when posts are made or edited or comments made.
+Cached files will still be deleted when posts are made or edited or comments made when preloading is enabled.
 
-See the [WP Super Cache homepage](https://wordpress.org/plugins/wp-super-cache/) for further information. [Developer documentation](http://z9.io/wp-super-cache-developers/) is also available for those who need to interact with the cache or write plugins.
+See the [WP Super Cache homepage](https://wordpress.org/plugins/wp-super-cache/) for further information. [Developer documentation](https://odd.blog/wp-super-cache-developers/) is also available for those who need to interact with the cache or write plugins.
 
 There's a [GIT repository](https://github.com/Automattic/wp-super-cache) too if you want to contribute a patch.
 
-The [changelog](http://svn.wp-plugins.org/wp-super-cache/trunk/Changelog.txt) is a good place to start if you want to know what has changed since you last downloaded the plugin.
+The [commit list](https://github.com/Automattic/wp-super-cache/commits/master) is a good place to start if you want to know what has changed since you last downloaded the plugin.
 
-Interested in translating WP Super Cache to your language? Grab the [development version](http://downloads.wordpress.org/plugin/wp-super-cache.zip) where you will find an up to date wp-super-cache.pot. Send any translation files to donncha @ ocaoimh.ie and thank you!
+Interested in translating WP Super Cache to your language? See the [translation page](https://translate.wordpress.org/projects/wp-plugins/wp-super-cache) for the plugin.
 
 The cache directory, usually wp-content/cache/ is only for temporary files. Do not ever put important files or symlinks to important files or directories in that directory. They will be deleted if the plugin has write access to them.
 
 == Upgrade Notice ==
+Sitemap, feed, REST API and other maintenance fixes.
 
-= 1.4.9 =
-Fixed XSS on the settings page, settings page updates, file locking fixes and PHP 7.1 fix, caching fixes on static homepage blogs and more.
 
 == Changelog ==
+= 1.5.4 =
+* Fix messages related to creating advanced-cache.php (#355, #354)
+* Deleting the plugin doesn't need to delete the cache directory as it's already done on deactivation. (#323)
+* Disable Jetpack mobile detection if Jetpack Beta is detected. (#298)
+* Add more checks on directories to make sure they exist before deleting them. (#324)
+* Add siteurl setting to CDN page for users who have WordPress in it's own directory. (#332)
+* Don't enable and then not save debug comments when toggling logging. (#334)
+* Show plugin activity html comments to users who disable caching for logged in users. (#335)
+* Better notifications on Preload page, and redo sql to fetch posts. Added "wpsc_preload_post_types_args" filter on post visibility, and wpsc_preload_post_types filter on post types used. (#336)
+* Use a cached feed if it is newer than the last time a post was updated. (#337)
+* Better define a sitemap (#340) but when the content type is unknown add more checks to find out what it is. (#346)
+* Save cache location correctly on the advanced settings page. (#345)
+* Make sure the debug log exists before toggling it on/off to ensure the http auth code is added to it.
+* Return the correct cache type to the REST API. Ignore supercache enabled status. (#352)
+* Fix cache contents in REST API showing double count of supercache files. (#353)
+* Move the nonce in the CDN page back into a function. (#346)
+* Use realpath to compare directories when loading the sample config file to account for symlinked directories. (#342)
+* Other minor changes to html or typos
+(Numbers are [pull requests](https://github.com/Automattic/wp-super-cache/pulls) on Github.)
+
+= 1.5.3 =
+* Fix a critical bug that caused unlink to be run on null while deleting the plugin.
+
+= 1.5.2 =
+* Add a trailing slash to home path. Fixes problems with finding the .htaccess file.
+* Delete WPCACHEHOME and WP_CACHE from wp-config.php when plugin deactivated.
+* Check that WPCACHEHOME is the right path on each load of the settings page.
+* Load the REST API code without using WPCACHEHOME.
+* Fixed mobile browser caching when using WP-Cache caching.
+* Fixed directory checks on Windows machines.
+* Reverted CDN changes in 1.5.0 as they caused problems in older "WordPress in a separate directory" installs.
+* Added note to CDN page when site url != home url. Site owners can use a filter to adjust the URL used.
+* Stop preload quicker when requested while preloading taxonomies.
+* Added more information for when updating the .htaccess file fails.
+* "Served by" header is now optional. Enable it by setting $wpsc_served_header to true in the config file.
+
+= 1.5.1 =
+* Don't use anonymous functions in REST API
+* Check that REST API Controller is available before loading the REST API.
+* Don't use multibyte string functions because some sites don't have it enabled.
+
+= 1.5.0 =
+* REST API settings endpoints.
+* Simplified settings page.
+* WP-Cache files reorganised.
+* Caching of more http headers.
+* Lots of bug fixes.
 
 = 1.4.9 =
 * Fixed bug when not running sem_remove after sem_release. See https://github.com/Automattic/wp-super-cache/issues/85
@@ -363,13 +405,16 @@ To manually uninstall:
 Go to Settings->WP Super Cache and look for the "Cache Tester" form on the easy settings page. Click "Test Cache" and the plugin will request the front page of the site twice, comparing a timestamp on each to make sure they match.
 
 If you want to do it manually, enable debugging in the plugin settings page and load the log file in a new browser tab. Then view your blog while logged in and logged out. You should see activity in the log. View the source of any page on your site. When a page is first created, you'll see the text "Dynamic page generated in XXXX seconds." and "Cached page generated by WP-Super-Cache on YYYY-MM-DD HH:MM:SS" at the end of the source code. On reload, a cached page will show the same timestamp so wait a few seconds before checking.
-In legacy caching mode, if you have compression enabled, the text "Compression = gzip" will be added. If compression is disabled and the page is served as a static html file, the text "super cache" will be added. The only other way to check if your cached file was served by PHP script or from the static cache is by looking at the HTTP headers. PHP cached pages will have the header "WP-Super-Cache: Served supercache file from PHP". Legacy cached files will have the header, "WP-Super-Cache: Served legacy cache file". I used the <a href="https://addons.mozilla.org/en-US/firefox/addon/3829">Live HTTP Headers</a> extension for Firefox to examine the headers. You should also check your cache directory in wp-content/cache/supercache/hostname/ for static cache files.
+If Supercaching is disabled and you have compression enabled, the text "Compression = gzip" will be added. If compression is disabled and the page is served as a static html file, the text "super cache" will be added. The only other way to check if your cached file was served by PHP script or from the static cache is by looking at the HTTP headers. PHP cached pages will have the header "WP-Super-Cache: Served supercache file from PHP". WPCache cached files will have the header, "WP-Super-Cache: Served WPCache cache file". You should also check your cache directory in wp-content/cache/supercache/hostname/ for static cache files.
 If the plugin rules are missing from your .htaccess file, the plugin will attempt to serve the super cached page if it's found. The header "WP-Super-Cache: Served supercache file from PHP" if this happens.
 
-= Legacy (WP-Cache) vs Supercache files =
+= How do I disable Supercaching? =
+
+If you only want to use the WP-Cache engine then edit your wp-config.php or create an mu-plugin that sets the constant 'DISABLE_SUPERCACHE' to 1.
 
-WP-Cache files are stored in wp-content/cache/ (or on MU sites in a blogs sub directory) and are named wp-cache-XXXXXXXXXXXXXXXXX.html. Associated meta files are stored in a meta sub directory. Those files contain information about the cached file. These files are generated by the "legacy caching" code in the plugin.
-Supercache files are stored in wp-content/cache/supercache/HOSTNAME/ where HOSTNAME is your domain name. The files are stored in directories matching your site's permalink structure.
+= WP-Cache vs Supercache files =
+
+All cache files are stored in wp-content/cache/supercache/HOSTNAME/ where HOSTNANE is your domain name. The files are stored in directories matching your site's permalink structure. Supercache files are index.html or some variant of that, depending on what type of visitor hit the blog. Other files are named wp-cache-XXXXXXXXXXXXXXXXX.php. Associated meta filesnames start with "meta". Those files contain information about the cached file. These files are generated by the "WPCache caching" engine in the plugin.
 
 = Will comments and other dynamic parts of my blog update immediately? =
 
@@ -383,11 +428,11 @@ No, it will do the opposite. Super Cache files are compressed and stored that wa
 
 Note: this functionality is disabled by default. You will have to enable it on the Advanced Settings page.
 
-There are 2 ways of doing this. You can use Javascript to draw the part of the page you want to keep dynamic. That's what Google Adsense and many widgets from external sites do and is the recommended way. Or you can use a WP Super Cache filter to do the job but you can't use mod_rewrite mode caching. You have to switch to PHP or legacy caching.
+There are 2 ways of doing this. You can use Javascript to draw the part of the page you want to keep dynamic. That's what Google Adsense and many widgets from external sites do and is the recommended way. Or you can use a WP Super Cache filter to do the job but you can't use mod_rewrite mode caching. You have to use the "simple" delivery method or disable supercaching.
 
 WP Super Cache 1.4 introduced a cacheaction filter called wpsc_cachedata. The cached page to be displayed goes through this filter and allows modification of the page. If the page contains a placeholder tag the filter can be used to replace that tag with your dynamically generated html.
 The function that hooks on to the wpsc_cachedata filter should be put in a file in the WP Super Cache plugins folder unless you use the late_init feature. An example plugin is included. Edit [dynamic-cache-test.php](http://svn.wp-plugins.org/wp-super-cache/trunk/plugins/dynamic-cache-test.php) to see the example code.
-There are two example functions there. There's a simple function that replaces a string (or tag) you define when the cached page is served. The other example function uses an output buffer to generate the dynamic content. Due to a limitation in how PHP works the output buffer code MUST run before the wpsc_cachedata filter is hit, at least for when a page is cached. It doesn't matter when serving cached pages. See [this post](http://z9.io/y/6j) for a more technical and longer explanation.
+There are two example functions there. There's a simple function that replaces a string (or tag) you define when the cached page is served. The other example function uses an output buffer to generate the dynamic content. Due to a limitation in how PHP works the output buffer code MUST run before the wpsc_cachedata filter is hit, at least for when a page is cached. It doesn't matter when serving cached pages. See [this post](https://odd.blog/y/6j) for a more technical and longer explanation.
 To execute WordPress functions you must enable the 'Late init' feature on the advanced settings page.
 
 = How do I use WordPress functions in cached dynamic pages? =
@@ -399,17 +444,17 @@ Cached files are served before almost all of WordPress is loaded. While that's g
 
 This plugin caches entire pages but some plugins think they can run PHP code every time a page loads. To fix this, the plugin needs to use Javascript/AJAX methods or the wpsc_cachedata filter described in the previous answer to update or display dynamic information.
 
-= Why do my WP Super Cache plugin disappear when I upgrade the plugin? =
+= Why do my WP Super Cache plugins disappear when I upgrade the plugin? =
 
 WordPress deletes the plugin folder when it updates a plugin. This is the same with WP Super Cache so any modified files in wp-super-cache/plugins/ will be deleted. You can define the variable $wp_cache_plugins_dir in wp-config.php or wp-content/wp-cache-config.php and point it at a directory outside of the wp-super-cache folder. The plugin will look there for it's plugins.
 
 = What does the Cache Rebuild feature do? =
 
-When a visitor leaves a comment the cached file for that page is deleted and the next visitor recreates the cached page. A page takes time to load so what happens if it receives 100 visitors during this time? There won't be a cached page so WordPress will serve a fresh page for each user and the plugin will try to create a cached page for each of those 100 visitors causing a huge load on your server. This feature stops this happening. The cached page is not cleared when a comment is left. It is marked for rebuilding instead. The next visitor within the next 10 seconds will regenerate the cached page while the old page is served to the other 99 visitors. The page is eventually loaded by the first visitor and the cached page updated. See [this post](http://z9.io/2009/01/23/wp-super-cache-089/) for more.
+When a visitor leaves a comment the cached file for that page is deleted and the next visitor recreates the cached page. A page takes time to load so what happens if it receives 100 visitors during this time? There won't be a cached page so WordPress will serve a fresh page for each user and the plugin will try to create a cached page for each of those 100 visitors causing a huge load on your server. This feature stops this happening. The cached page is not cleared when a comment is left. It is marked for rebuilding instead. The next visitor within the next 10 seconds will regenerate the cached page while the old page is served to the other 99 visitors. The page is eventually loaded by the first visitor and the cached page updated. See [this post](https://odd.blog/2009/01/23/wp-super-cache-089/) for more.
 
 = Why doesn't the plugin cache requests by search engine bots by default? =
 
-Those bots usually only visit each page once and if the page is not popular there's no point creating a cache file that will sit idle on your server. However if you're not using legacy caching you can allow these visits to be cached by removing the list of bots from "Rejected User Agents" on the Advanced settings page.
+Those bots usually only visit each page once and if the page is not popular there's no point creating a cache file that will sit idle on your server. However you can allow these visits to be cached by removing the list of bots from "Rejected User Agents" on the Advanced settings page.
 
 = A category page is showing instead of my homepage =
 
@@ -418,19 +463,19 @@ A tiny proportion of websites will have problems with the following configuratio
 1. Uses a static page for the front page.
 2. Uses /%category%/%postname%/ permalink structure.
 
-Sometimes a category page is cached as the homepage of the site instead of the static page. I can't [replicate the problem](http://wordpress.org/support/topic/237415/page/2?replies=38) but a simple solution is to switch the plugin to PHP mode. For normal traffic you will see no difference in the speed of your site. You can also enable "Extra homepage checks" on the Advanced Settings page.
+Sometimes a category page is cached as the homepage of the site instead of the static page. I can't [replicate the problem](http://wordpress.org/support/topic/237415/page/2?replies=38) but a simple solution is to use the "Simple" mode. You can also enable "Extra homepage checks" on the Advanced Settings page.
 
 = Why do I get warnings about caching from http://ismyblogworking.com/ =
 
 "Your blog doesn't support client caching (no 304 response to If-modified-since)."
 "Your feed doesn't support caching (no 304 response to If-modified-since)"
 
-Supercache doesn't support 304 header checks in mod_rewrite mode but does support it in PHP mode. This is caching done by your browser, not the server. It is a check your browser does to ask the server if an updated version of the current page is available. If not, it doesn't download the old version again. The page is still cached by your server, just not by your visitors' browsers.
+Supercache doesn't support 304 header checks in Expert mode but does support it in Simple mode. This is caching done by your browser, not the server. It is a check your browser does to ask the server if an updated version of the current page is available. If not, it doesn't download the old version again. The page is still cached by your server, just not by your visitors' browsers.
 Try the Cacheability Engine at http://www.ircache.net/cgi-bin/cacheability.py or http://redbot.org/ for further analysis.
 
 = How should I best use the utm_source tracking tools in Google Analytics with this plugin? =
 
-That tracking adds a query string to each url linked from various sources like Twitter and feedreaders. Unfortunately it stops pages being supercached. See [Joost's comment here](http://z9.io/remove-unused-utmsource-urls/#comment-672813) for how to turn it into an anchor tag which can be supercached.
+That tracking adds a query string to each url linked from various sources like Twitter and feedreaders. Unfortunately it stops pages being supercached. See [Joost's comment here](https://odd.blog/remove-unused-utmsource-urls/#comment-672813) for how to turn it into an anchor tag which can be supercached.
 
 = The plugin complains that wp-content is writable! htdocs is writable! =
 
@@ -459,7 +504,7 @@ The only real limit are limits defined by your server. For example, EXT2 and EXT
 
 = How do I serve cached mobile pages to clients on small screens like phones and tablets? =
 
-You'll have to use a separate mobile plugin to render a page formatted for those visitors. The following plugins have been tested but YMMV depending on mobile client.
+Your theme is probably responsive which means it resizes the page to suit whatever device is displaying the page. If it's not responsive, you'll have to use a separate mobile plugin to render a page formatted for those visitors. The following plugins have been tested but YMMV depending on mobile client. You'll have to enable mobile browser support as well on the Advanced settings page.
 
 * [Jetpack's Mobile Theme Module](http://wordpress.org/plugins/jetpack)
 * [WPTouch](http://wordpress.org/plugins/wptouch/)
@@ -492,7 +537,7 @@ If things don't work when you installed the plugin here are a few things to chec
     `127.0.0.1 myhostname.com`
 17. If old pages are being served to your visitors via the supercache, you may be missing Apache modules (or their equivalents if you don't use Apache). 3 modules are required: mod_mime, mod_headers and mod_expires. The last two are especially important for making sure browsers load new versions of existing pages on your site.
 18. The error message, "WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed!" appears at the end of every page. Open the file wp-content/advanced-cache.php in your favourite editor. Is the path to wp-cache-phase1.php correct? This file will normally be in wp-content/plugins/wp-super-cache/. If it is not correct the caching engine will not load.
-19. Caching doesn't work. The timestamp on my blog keeps changing when I reload. Check that the path in your .htaccess rules matches where the supercache directory is. You may have to hardcode it. Or use the plugin in PHP or legacy caching mode.
+19. Caching doesn't work. The timestamp on my blog keeps changing when I reload. Check that the path in your .htaccess rules matches where the supercache directory is. You may have to hardcode it. Try disabling supercache mode.
 20. If supercache cache files are generated but not served, check the permissions on all your wp-content/cache/supercache folders (and each of wp-content cache and supercache folders) and wp-content/cache/.htaccess. If your PHP runs as a different user to Apache and permissions are strict Apache may not be able to read the PHP generated cache files. To fix you must add the following line to your wp-config.php (Add it above the WP_CACHE define.) Then clear your cache.
 
 	`umask( 0022 );`
@@ -513,6 +558,20 @@ If that doesn't work, add this line to your wp-config.php:
 18. The error message, "WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory." appears at the end of every page. You can delete wp-content/advanced-cache.php and reload the plugin settings page or edit wp-config.php and look for WPCACHEHOME and make sure it points at the wp-super-cache folder. This will normally be wp-content/plugins/wp-super-cache/ but you'll likely need the full path to that file (so it's easier to let the settings page fix it). If it is not correct the caching engine will not load.
 19. If your server is running into trouble because of the number of semaphores used by the plugin it's because your users are using file locking which is not recommended (but is needed by a small number of users). You can globally disable file locking by defining the constant WPSC_DISABLE_LOCKING, or defining the constant WPSC_REMOVE_SEMAPHORE so that sem_remove() is called after every page is cached but that seems to cause problems for other processes requesting the same semaphore. Best to disable it.
 
+== Preloading ==
+
+You can generate cached files for the posts, categories and tags of your site by preloading. Preloading will visit each page of your site generating a cached page as it goes along, just like any other visitor to the site. Due to the sequential nature of this function, it can take some time to preload a complete site if there are many posts.
+To make preloading more effective it can be useful to disable garbage collection so that older cache files are not deleted. This is done by enabling "Preload Mode" in the settings. Be aware however, that pages will go out of date eventually but that updates by submitting comments or editing posts will clear portions of the cache.
+
+== Garbage Collection ==
+
+Your cache directory fills up over time, which takes up space on your server. If space is limited or billed by capacity, or if you worry that the cached pages of your site will go stale then garbage collection has to be done. Garbage collection happens on a regular basis and deletes old files in the cache directory. On the advanced settings page you can specify:
+1. Cache timeout. How long cache files are considered fresh for. After this time they are stale and can be deleted.
+2. Scheduler. Setup how often garbage collection should be done.
+3. Notification emails. You can be informed on garbage collection job progress.
+There's no right or wrong settings for garbage collection. It depends on your own site.
+If your site gets regular updates, or comments then set the timeout to 1800 seconds, and set the timer to 600 seconds.
+If your site is mostly static you can disable garbage collection by entering 0 as the timeout, or use a really large timeout value.
 
 == CDN ==
 
@@ -522,6 +581,10 @@ A Content Delivery Network (CDN) is usually a network of computers situated arou
 
 Configure this on the "CDN" tab of the plugin settings page. This is an advanced technique and requires a basic understanding of how your webserver or CDNs work. Please be sure to clear the file cache after you configure the CDN.
 
+== REST API ==
+
+There are now REST API endpoints for accessing the settings of this plugin. You'll need to be authenticated as an admin user with permission to view the settings page to use it. This has not been documented yet but you can find all the code that deals with this in the "rest" directory.
+
 == Custom Caching ==
 It is now possible to hook into the caching process using the add_cacheaction() function.
 
@@ -535,34 +598,7 @@ There is one regular WordPress filter too. Use the "do_createsupercache" filter
 to customize the checks made before caching. The filter accepts one parameter.
 The output of WP-Cache's wp_cache_get_cookies_values() function.
 
-See plugins/searchengine.php as an example I use for my [No Adverts for Friends](http://z9.io/no-adverts-for-friends/) plugin.
-
-== Links ==
-[WP Widget Cache](http://wordpress.org/plugins/wp-widget-cache/) is another caching plugin for WordPress. This plugin caches the output of widgets and may significantly speed up dynamic page generation times.
+See plugins/searchengine.php as an example I use for my [No Adverts for Friends](https://odd.blog/no-adverts-for-friends/) plugin.
 
 == Updates ==
-Updates to the plugin will be posted here, to [Holy Shmoly!](http://z9.io/) and the [WP Super Cache homepage](https://wordpress.org/plugins/wp-super-cache/) will always link to the newest version.
-
-== Thanks ==
-I would sincerely like to thank [John Pozadzides](http://onemansblog.com/) for giving me the idea for this, for writing the "How it works" section and for testing the plugin through 2 front page appearances on digg.com
-
-Thanks to James Farmer and Andrew Billits of [Edu Blogs](http://edublogs.org/) fame who helped me make this more WordPress MU friendly.
-
-Translators who did a great job converting the text of the plugin to their native language. Thank you!
-
-* [Gianni Diurno](http://gidibao.net/) (Italian)
-* [Omi](http://equipajedemano.info/) (Spanish)
-* [tomchen1989](http://emule-fans.com/) and [Christopher Meng](http://cicku.me) (Simplified Chinese)
-* Tai (Japanese)
-* [Vitaly](http://pressword.com.ua/wordpress/) (Ukranian)
-* [Pseric](http://pseric.com/) and [Priv](http://priv.tw/blog) (Traditional Chinese)
-* [Ma�tre M�](http://maitremo.fr/) (French)
-* [Mathias Roth](http://trade-service.eu/) (German)
-* Bar�� �nver (Turkish)
-* [Elvis Fweb](http://wp.turkenichev.ru/) (Russian)
-* Fredrik Fors�ll (Swedish)
-* [Alyona Lompar](http://wwww.webhostinggeeks.com/) (Ukranian)
-* [Nata Strazda](http://www.webhostingrating.com/) (Lithuanian)
-* [Alexander Alexandrov](http://www.designcontest.com/) (Belarusian)
-* [Michail Bogdanov](http://www.webhostinghub.com/) (Romanian)
-* [Anja Skrba](http://science.webhostinggeeks.com/wordpress-super-cache) (Serbo-Croatian)
+Updates to the plugin will be posted here, to [Holy Shmoly!](https://odd.blog/) and the [WP Super Cache homepage](https://wordpress.org/plugins/wp-super-cache/) will always link to the newest version.
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-delete-cache.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-delete-cache.php
new file mode 100644
index 0000000000000000000000000000000000000000..255458f2c79a9a7609716af75ee2a0150c50e1f5
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-delete-cache.php
@@ -0,0 +1,35 @@
+<?php
+
+class WP_Super_Cache_Rest_Delete_Cache extends WP_REST_Controller {
+
+	/**
+	 * Get a collection of items
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		$params = $request->get_json_params();
+
+		if ( isset( $params['id'] ) && is_numeric( $params['id'] ) ) {
+			wpsc_delete_post_cache( $params['id'] );
+
+		} elseif ( !empty( $params['expired'] ) ) {
+			global $file_prefix;
+			wp_cache_clean_expired( $file_prefix );
+
+		} elseif ( isset( $params['url'] ) ) {
+			global $cache_path;
+
+			$directory = $cache_path . 'supercache/' . $params[ 'url' ];
+			wpsc_delete_files( $directory );
+			prune_super_cache( $directory . '/page', true );
+
+		} else {
+			global $file_prefix;
+			wp_cache_clean_cache( $file_prefix, !empty( $params['all'] ) );
+		}
+
+		return rest_ensure_response( array( 'Cache Cleared' => true ) );
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-cache.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-cache.php
new file mode 100644
index 0000000000000000000000000000000000000000..2cad9eddb3ab49519f095539c1cbb9bdd626ae11
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-cache.php
@@ -0,0 +1,45 @@
+<?php
+
+class WP_Super_Cache_Rest_Get_Cache extends WP_REST_Controller {
+
+	/**
+	 * Get a collection of items
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		global $valid_nonce;
+
+		$valid_nonce = true;
+		$_GET[ 'listfiles' ] = 1;
+		$sizes = wpsc_generate_sizes_array();
+		$supercachedir = get_supercache_dir();
+		$list = wpsc_dirsize( $supercachedir, $sizes );
+		$return_list = array();
+
+		foreach( $list as $type => $file_list ) {
+			foreach ( $file_list as $state => $value ) {
+				if ( is_array( $value ) ) {
+					foreach( $value as $filenames ) {
+						foreach( $filenames as $filename => $t ) {
+							if ( $type == 'wpcache' ) {
+								$filename = dirname( $filename );
+							}
+							if ( false == isset( $return_list[ $type ][ $state ] ) || false == in_array( $filename, $return_list[ $type ][ $state ] ) )
+								$return_list[ $type ][ $state ][] = $filename;
+						}
+					}
+				}
+			}
+
+			if ( isset ( $return_list[ $type ] ) ) {
+				$list[ $type ] = $return_list[ $type ];
+			}
+
+			unset( $return_list[ $type ] );
+		}
+
+		return rest_ensure_response( $list );
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-settings.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-settings.php
new file mode 100644
index 0000000000000000000000000000000000000000..b6f5b805b1bb8cd5e5906f21eb815ee3109b6564
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-settings.php
@@ -0,0 +1,205 @@
+<?php
+
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-settings-map.php' );
+
+class WP_Super_Cache_Rest_Get_Settings extends WP_REST_Controller {
+
+	/**
+	 * Get the settings.
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		$settings = array();
+
+		global $wp_cache_config_file;
+
+		if ( defined( 'WPLOCKDOWN' ) ) {
+			$config_file = file_get_contents( $wp_cache_config_file );
+			if ( false === strpos( $config_file, "defined( 'WPLOCKDOWN' )" ) ) {
+				wp_cache_replace_line( '^.*WPLOCKDOWN', "if ( ! defined( 'WPLOCKDOWN' ) ) define( 'WPLOCKDOWN', " . $this->get_is_lock_down_enabled() . " );", $wp_cache_config_file );
+			}
+		}
+
+		if ( function_exists( "opcache_invalidate" ) ) {
+			opcache_invalidate( $wp_cache_config_file );
+		}
+		include( $wp_cache_config_file );
+
+		foreach ( WP_Super_Cache_Settings_Map::$map as $name => $map ) {
+			if ( isset ( $map['get'] ) ) {
+				$get_method = $map['get'];
+
+				if ( method_exists( $this, $get_method ) ) {
+					$settings[ $name ] = $this->$get_method();
+
+				} elseif ( function_exists( $get_method ) ) {
+					$settings[ $name ] = $get_method();
+				}
+
+			} else if ( isset ( $map['option'] ) ) {
+				$settings[ $name ] = get_option( $map['option'] );
+
+			} elseif ( isset( $map['global'] ) ) {
+				$global_var = $map['global'];
+				$settings[ $name ] = $$global_var;
+			}
+		}
+
+		return $this->prepare_item_for_response( $settings, $request );
+	}
+
+	/**
+	 * @return string
+	 */
+	public function get_ossdl_off_blog_url() {
+		$url = get_option( 'ossdl_off_blog_url' );
+		if ( ! $url )
+			$url = apply_filters( 'ossdl_off_blog_url', untrailingslashit( get_option( 'siteurl' ) ) );
+		return $url;
+	}
+
+	/**
+	 * @return string
+	 */
+	public function get_cache_path_url() {
+		global $cache_path;
+
+		return site_url( str_replace( ABSPATH, '', "{$cache_path}" ) );
+	}
+
+	/**
+	 * @return string
+	 */
+	public function get_cache_type() {
+		global $wp_cache_config_file;
+		if ( function_exists( "opcache_invalidate" ) ) {
+			opcache_invalidate( $wp_cache_config_file );
+		}
+		include( $wp_cache_config_file );
+
+		if ( $wp_cache_mod_rewrite == 1 ) {
+			return 'mod_rewrite';
+		} else {
+			return 'PHP';
+		}
+	}
+
+	/**
+	 * Prepare the item for the REST response
+	 *
+	 * @param mixed $item WordPress representation of the item.
+	 * @param WP_REST_Request $request Request object.
+	 * @return mixed
+	 */
+	public function prepare_item_for_response( $item, $request ) {
+		$settings = array();
+
+		$integers = array( 'cache_max_time', 'preload_interval' );
+		$string_arrays = array( 'cache_stats', 'cache_acceptable_files', 'cache_rejected_uri', 'cache_rejected_user_agent',
+			'cache_direct_pages' );
+		foreach( $item as $key => $value ) {
+			if ( is_array( $value ) && false == in_array( $key, $string_arrays ) ) {
+				array_walk( $value, array( $this, 'make_array_bool' ) );
+
+			} elseif ( ( $value === 0 || $value === 1 ) && false == in_array( $key, $integers ) ) {
+				$value = (bool)$value;
+			}
+
+			$settings[ $key ] = $value;
+		}
+
+		$strings_to_bool = array( 'ossdl_https', 'refresh_current_only_on_comments' );
+		foreach( $strings_to_bool as $key ) {
+			if ( isset( $settings[ $key ] ) ) {
+				$settings[ $key ] = (bool)$settings[ $key ];
+			}
+		}
+
+		return rest_ensure_response( $settings );
+	}
+
+	/**
+	 * @param mixed $value
+	 * @param string $key
+	 */
+	public function make_array_bool( &$value, $key ) {
+		if ( $value == 0 || $value == 1 ) {
+			$value = (bool) $value;
+		}
+	}
+
+	/**
+	 * @return bool
+	 */
+	protected function get_is_submit_enabled() {
+		global $wp_cache_config_file;
+		return is_writeable_ACLSafe( $wp_cache_config_file );
+	}
+
+	/**
+	 * @return bool
+	 */
+	protected function get_is_preload_enabled() {
+		return false === defined( 'DISABLESUPERCACHEPRELOADING' );
+	}
+
+	/**
+	 * @return false|int
+	 */
+	protected function get_next_gc() {
+		return wp_next_scheduled( 'wp_cache_gc' );
+	}
+
+	/**
+	 * @return int
+	 */
+	protected function get_is_preload_active() {
+		if ( wp_next_scheduled( 'wp_cache_preload_hook' ) || wp_next_scheduled( 'wp_cache_full_preload_hook' ) ) { 
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * @return int
+	 */
+	protected function get_minimum_preload_interval() {
+		global $wpdb;
+		$count = $this->get_post_count();
+		if ( $count > 1000 ) {
+			$min_refresh_interval = 720;
+		} else {
+			$min_refresh_interval = 30;
+		}
+
+		return $min_refresh_interval;
+	}
+
+	/**
+	 * @return int
+	 */
+	protected function get_is_lock_down_enabled() {
+		if ( defined( 'WPLOCKDOWN' ) ) {
+			return constant( 'WPLOCKDOWN' ) ? 1 : 0;
+		}
+
+		return 0;
+	}
+
+	/**
+	 * @return int
+	 */
+	protected function get_post_count() {
+		return wpsc_post_count();
+	}
+
+	/**
+	 * @return string
+	 */
+	protected function get_default_cache_path() {
+		return WP_CONTENT_DIR . '/wp-cache/';
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-stats.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-stats.php
new file mode 100644
index 0000000000000000000000000000000000000000..811f5a567ac8c2128c2429a81653e9926e61cfe8
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-stats.php
@@ -0,0 +1,18 @@
+<?php
+
+class WP_Super_Cache_Rest_Get_Stats extends WP_REST_Controller {
+
+	/**
+	 * Get the cache stats for the site.
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		global $valid_nonce;
+		$_GET[ 'listfiles' ] = 1;
+		$valid_nonce = true;
+
+		return rest_ensure_response( wp_cache_regenerate_cache_file_stats() );
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-status.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-status.php
new file mode 100644
index 0000000000000000000000000000000000000000..f0a4ae40707016675810c61ee8bc499b9eb4af5b
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-get-status.php
@@ -0,0 +1,114 @@
+<?php
+
+class WP_Super_Cache_Rest_Get_Status extends WP_REST_Controller {
+
+	/**
+	 * Get any status that might be visible.
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		$status = array();
+
+		include_once( ABSPATH . 'wp-admin/includes/file.php' ); // get_home_path()
+		include_once( ABSPATH . 'wp-admin/includes/misc.php' ); // extract_from_markers()
+		$this->add_rewrite_status( $status );
+		$this->add_cache_disabled_status( $status );
+		$this->add_compression_status( $status );
+		$this->add_php_mod_rewrite_status( $status );
+		$this->add_preload_status( $status );
+
+		if ( empty( $status ) ) {
+			return rest_ensure_response( new stdclass() );
+		} else {
+			return rest_ensure_response( $status );
+		}
+	}
+
+	/**
+	 * @param array $status
+	 */
+	protected function add_preload_status( & $status ) {
+		global $wp_cache_config_file;
+
+		include( $wp_cache_config_file );
+
+		if ( false == $cache_enabled ) {
+			$status[ 'preload_disabled_cache_off' ] = true;
+		}
+		if ( false == $super_cache_enabled ) {
+			$status[ 'preload_disabled_supercache_off' ] = true;
+		}
+		if ( true === defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
+			$status[ 'preload_disabled_by_admin' ] = true;
+		}
+	}
+
+	/**
+	 * @param array $status
+	 */
+	protected function add_php_mod_rewrite_status( & $status ) {
+		global $wp_cache_config_file;
+
+		include( $wp_cache_config_file );
+
+		if ( $cache_enabled && !$wp_cache_mod_rewrite ) {
+			$scrules = trim( implode( "\n", extract_from_markers( trailingslashit( get_home_path() ) . '.htaccess', 'WPSuperCache' ) ) );
+			if ( $scrules != '' ) {
+				$status[ 'php_mod_rewrite' ] = true;
+			}
+		}
+	}
+
+	/**
+	 * @param array $status
+	 */
+	protected function add_cache_disabled_status( & $status ) {
+		global $wp_cache_config_file;
+
+		if ( ! is_writeable_ACLSafe( $wp_cache_config_file ) ) {
+			$status['cache_disabled'] = true;
+		}
+	}
+
+	/**
+	 * @param array $status
+	 */
+	protected function add_compression_status( & $status ) {
+		if ( defined( 'WPSC_DISABLE_COMPRESSION' ) ) {
+			$status['compression_disabled_by_admin'] = true;
+		} elseif ( false == function_exists( 'gzencode' ) ) {
+			$status['compression_disabled_no_gzencode'] = true;
+		}
+	}
+
+	/**
+	 * @param array $status
+	 */
+	protected function add_rewrite_status( & $status ) {
+		global $home_path, $wp_cache_config_file;
+
+		include( $wp_cache_config_file );
+
+		// Return if the rewrite caching is disabled.
+		if ( ! $cache_enabled || ! $super_cache_enabled || ! $wp_cache_mod_rewrite ) {
+			return;
+		}
+
+		$scrules = implode( "\n", extract_from_markers( $home_path . '.htaccess', 'WPSuperCache' ) );
+		extract( wpsc_get_htaccess_info() );
+
+		if ( $scrules != $rules ) {
+			$status[ 'mod_rewrite_rules' ] = true;
+		}
+		$got_rewrite = apache_mod_loaded( 'mod_rewrite', true );
+		if ( $wp_cache_mod_rewrite && false == apply_filters( 'got_rewrite', $got_rewrite ) ) {
+			$status[ 'mod_rewrite_missing' ] = true;
+		}
+
+		if ( !is_writeable_ACLSafe( $home_path . ".htaccess" ) ) {
+			$status[ 'htaccess_ro' ] = true;
+		}
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-preload.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-preload.php
new file mode 100644
index 0000000000000000000000000000000000000000..3e0214e4f51ec8d53bce612f7de00c74d1d83f4b
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-preload.php
@@ -0,0 +1,31 @@
+<?php
+
+class WP_Super_Cache_Rest_Preload extends WP_REST_Controller {
+
+	/**
+	 * Update the cache settings.
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		$parameters = $request->get_json_params();
+
+		if ( defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
+			wp_cache_debug( 'WP_Super_Cache_Rest_Preload: preload disabled by admin' );
+			return rest_ensure_response( array( 'error' => 'preload disabled by admin' ) );
+		}
+
+		if ( isset( $parameters[ 'enable' ] ) ) {
+			if ( $parameters[ 'enable' ] == true ) {
+				wp_cache_debug( 'WP_Super_Cache_Rest_Preload: enable' );
+				wpsc_enable_preload();
+				return( rest_ensure_response( array( 'enabled' => true ) ) );
+			} else {
+				wp_cache_debug( 'WP_Super_Cache_Rest_Preload: cancel' );
+				wpsc_cancel_preload();
+				return( rest_ensure_response( array( 'enabled' => false ) ) );
+			}
+		}
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-test-cache.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-test-cache.php
new file mode 100644
index 0000000000000000000000000000000000000000..3f2a72da7f430763e62ed2b03719b71ff0997232
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-test-cache.php
@@ -0,0 +1,97 @@
+<?php
+
+class WP_Super_Cache_Rest_Test_Cache extends WP_REST_Controller {
+
+	/**
+	 * Get a collection of items
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		global $cache_path;
+
+		$url = trailingslashit( get_bloginfo( 'url' ) );
+
+		$response = array( 'status' => 'UNKNOWN' );
+		$has_errors = false;
+
+		$attempts = array( 'prime', 'first', 'second' );
+
+		$c = 0;
+		foreach ( $attempts as $attempt_name ) {
+			$attempt = array();
+			$page[ $c ] = wp_remote_get( $url, array('timeout' => 60, 'blocking' => true ) );
+
+			if ( ! is_wp_error( $page[ $c ] ) ) {
+				$fp = fopen( $cache_path . $c . ".html", "w" );
+				fwrite( $fp, $page[ $c ][ 'body' ] );
+				fclose( $fp );
+			}
+
+			if ( is_wp_error( $page[ $c ] ) ) {
+				$has_errors = true;
+				$attempt['status'] = false;
+				$attempt['errors'] = $this->format_error( $page[ $c ] );
+
+			} elseif ( $page[ $c ]['response']['code'] != 200 ) {
+				$has_errors = true;
+				$attempt['status'] = false;
+				$attempt['errors'] = array( $page[ $c ]['response']['message'] );
+
+			// Don't run this step on prime cache.
+			} elseif ( 0 !== $c && 0 === preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ $c ]['body'], $matches2 ) ) {
+				$has_errors = true;
+				$attempt['status'] = false;
+				$attempt['errors'] = array( __( 'Timestamps not found', 'wp-super-cache' ) );
+
+			} else {
+				$attempt['status'] = true;
+			}
+
+
+			$response[ 'attempts' ][ $attempt_name ] = $attempt;
+			$c++;
+		}
+
+		if (
+			false == $has_errors &&
+			preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 1 ][ 'body' ], $matches1 ) &&
+			preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 2 ][ 'body' ], $matches2 ) && 
+			$matches1[2] == $matches2[2]
+		) {
+			$response[ 'status' ] = true;
+		} else {
+			$response[ 'status' ] = false;
+			$response[ 'error' ] = array( __( 'Timestamps do not match', 'wp-super-cache' ) );
+		}
+
+		$error = '';
+		if ( $response[ 'status' ] == false ) {
+			if ( isset( $response[ 'error' ] ) ) {
+				$error = $response[ 'error' ];
+			} else {
+				foreach( $response[ 'attempts' ] as $attempt ) {
+					$error .= $attempt[ 'errors' ] . "\n";
+				}
+			}
+			return new WP_Error( 'test_error', $error, array( 'status' => 500 ) );
+		}
+		return rest_ensure_response( $response );
+	}
+
+	/**
+	 * @param WP_Error $error
+	 * @return array
+	 */
+	protected function format_error( WP_Error $error ) {
+		$messages = array();
+		foreach ( $error->get_error_codes() as $code ) {
+			foreach ( $error->get_error_messages( $code ) as $err ) {
+				$messages[] = $err;
+			}
+		}
+
+		return $messages;
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-update-settings.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-update-settings.php
new file mode 100644
index 0000000000000000000000000000000000000000..ab362d64a96aa8b101dd44bec2307284a4c40306
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-rest-update-settings.php
@@ -0,0 +1,661 @@
+<?php
+
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-settings-map.php' );
+
+class WP_Super_Cache_Rest_Update_Settings extends WP_REST_Controller {
+
+	/**
+	 * Update the cache settings.
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 *
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function callback( $request ) {
+		$parameters = $request->get_json_params();
+
+		// Override to force locking.
+		if ( defined( 'WPSC_DISABLE_LOCKING' ) ) {
+			$parameters['cache_disable_locking'] = 1;
+		}
+
+		// Set the nonce to valid, so that form sets will work later.
+		global $valid_nonce;
+		$valid_nonce = true;
+
+		$errors = array();
+
+		if ( isset( $parameters['easy'] ) ) {
+			$errors = $this->toggle_easy_caching( $parameters['easy'] );
+
+		} elseif ( isset( $parameters[ 'reset' ] ) ) {
+			$errors = $this->restore_default_settings( $parameters );
+
+		} else {
+
+			foreach ( $parameters as $name => $value ) {
+				if ( $has_error = $this->set_value_by_key( $value, $name ) ) {
+					if ( false == is_numeric( $has_error ) && false == is_bool( $has_error ) ) {
+						$errors[] = $has_error;
+					}
+				}
+			}
+
+			$this->save_time_settings( $parameters );
+			$this->save_preload_settings();
+			$this->set_debug_settings( $parameters );
+		}
+
+		if ( count( $errors ) > 0 ) {
+			return rest_ensure_response( $errors );
+
+		} else {
+			$get_settings = new WP_Super_Cache_Rest_Get_Settings();
+			return $get_settings->callback( $request );
+		}
+	}
+
+	/**
+	 * Given a key and a value, set the value for that key, based on
+	 * the configuration in the settings map.
+	 *
+	 * @param mixed $value
+	 * @param string $key
+	 *
+	 * @return string|null
+	 */
+	protected function set_value_by_key( $value, $key ) {
+
+		$settings_map = WP_Super_Cache_Settings_Map::$map;
+		$error = null;
+
+		// If this parameter isn't in the map, then let's ignore it.
+		if ( ! isset( $settings_map[ $key ] ) ) {
+			return null;
+		}
+
+		$map = $settings_map[ $key ];
+
+		if ( isset( $map['set'] ) ) {
+			$set_method = $map['set'];
+
+			if ( method_exists( $this, $set_method ) ) {
+				if ( $has_error = $this->$set_method( $value, $key ) ) {
+					$error = $has_error;
+				}
+
+			} elseif ( function_exists( $set_method ) ) {
+				$set_method( $value );
+			}
+
+		} elseif ( isset( $map['global'] ) ) {
+
+			if ( method_exists( $this, 'set_' . $map['global'] ) ) {
+				$set_method = 'set_' . $map['global'];
+
+				if ( $has_error = $this->$set_method( $value ) ) {
+					$error = $has_error;
+				}
+			} else {
+
+				$this->set_global( $map['global'], $value );
+			}
+		}
+
+		return $error;
+	}
+
+	/**
+	 * A generic method for setting globals.
+	 *
+	 * The setting must be added to the whitelist in order to be set this way.
+	 *
+	 * @param string $global_name
+	 * @param mixed $value
+	 */
+	protected function set_global( $global_name, $value ) {
+		$whitelist = array(
+			'wp_super_cache_late_init',
+			'wp_cache_disable_utf8',
+			'wp_cache_no_cache_for_get',
+			'wp_supercache_304',
+			'wp_cache_mfunc_enabled',
+			'wp_cache_mobile_enabled',
+			'wp_cache_front_page_checks',
+			'wp_supercache_cache_list',
+			'wp_cache_hello_world',
+			'wp_cache_clear_on_post_edit',
+			'cache_rebuild_files',
+			'wp_cache_refresh_single_only',
+			'wp_cache_mutex_disabled',
+			'wpsc_save_headers',
+		);
+
+		if ( ! in_array( $global_name, $whitelist ) ) {
+			return false;
+		}
+
+		wp_cache_setting( $global_name, (int)$value );
+
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_wp_cache_location( $value ) {
+		global $cache_path;
+
+		if ( $value != '' && ( ! isset( $cache_path ) || $value != $cache_path ) ) {
+			$dir = realpath( trailingslashit( dirname( $value ) ) );
+			if ( $dir == false ) {
+				$dir = WP_CONTENT_DIR . '/cache/';
+
+			} else {
+				$dir = trailingslashit( $dir ) . trailingslashit( wpsc_deep_replace( array(
+						'..',
+						'\\'
+					), basename( $value ) ) );
+			}
+
+			$new_cache_path = $dir;
+
+		} else {
+			$new_cache_path = WP_CONTENT_DIR . '/cache/';
+		}
+
+		if ( $new_cache_path != $cache_path ) {
+			if ( file_exists( $new_cache_path ) == false ) {
+				rename( $cache_path, $new_cache_path );
+			}
+
+			$cache_path = $new_cache_path;
+			wp_cache_setting( 'cache_path', $cache_path );
+		}
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_cache_enabled( $value ) {
+		if ( $value != 1 ) {
+			wp_cache_disable();
+
+			return;
+		}
+
+		wp_cache_enable();
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_lock_down( $value ) {
+		$_POST[ 'wp_lock_down' ] = (int)$value;
+		wp_update_lock_down();
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_super_cache_enabled( $value ) {
+		global $wp_cache_mod_rewrite;
+
+		if ( is_numeric( $value ) == false ) {
+			$types = array( 'wpcache' => 0, 'mod_rewrite' => 1, 'PHP' => 2 );
+			if ( isset( $types[ $value ] ) ) {
+				$value = $types[ $value ];
+			} else {
+				return false;
+			}
+		}
+
+		if ( $value === 0 ) { // WPCache
+			wp_super_cache_disable();
+
+		} else {
+			wp_super_cache_enable();
+			$wp_cache_mod_rewrite = 0; // PHP recommended
+
+			if ( $value == 1 ) { // mod_rewrite
+				$wp_cache_mod_rewrite = 1;
+				add_mod_rewrite_rules();
+
+			} elseif( $value == 2 ) { // PHP
+				$wp_cache_mod_rewrite = 0;
+				remove_mod_rewrite_rules();
+
+			}
+
+			wp_cache_setting( 'wp_cache_mod_rewrite', $wp_cache_mod_rewrite );
+		}
+		return true;
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_wp_cache_not_logged_in( $value ) {
+		global $wp_cache_not_logged_in, $cache_path;
+
+		if ( 1 == $value ) {
+			if ( 0 == $wp_cache_not_logged_in && function_exists( 'prune_super_cache' ) ) {
+				prune_super_cache( $cache_path, true );
+			}
+
+			$wp_cache_not_logged_in = 1;
+
+		} else {
+			$wp_cache_not_logged_in = 0;
+		}
+
+		wp_cache_setting( 'wp_cache_not_logged_in', $wp_cache_not_logged_in );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_wp_cache_make_known_anon( $value ) {
+		global $wp_cache_make_known_anon, $cache_path;
+
+		if ( 1 == $value ) {
+			if ( $wp_cache_make_known_anon == 0 && function_exists( 'prune_super_cache' ) ) {
+				prune_super_cache( $cache_path, true );
+			}
+
+			$wp_cache_make_known_anon = 1;
+
+		} else {
+			$wp_cache_make_known_anon = 0;
+		}
+
+		wp_cache_setting( 'wp_cache_make_known_anon', $wp_cache_make_known_anon );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_wp_cache_object_cache( $value ) {
+		global $_wp_using_ext_object_cache, $wp_cache_object_cache, $cache_path;
+
+		if ( ! $_wp_using_ext_object_cache ) {
+			return;
+		}
+
+		if ( $value == 0 ) {
+			if ( function_exists( 'prune_super_cache' ) ) {
+				prune_super_cache( $cache_path, true );
+			}
+
+			$wp_cache_object_cache = 1;
+
+		} else {
+			$wp_cache_object_cache = 0;
+		}
+
+		wp_cache_setting( 'wp_cache_object_cache', $wp_cache_object_cache );
+	}
+
+	/**
+	 * @param mixed $value
+	 *
+	 * @return null|string
+	 */
+	protected function set_cache_compression( $value ) {
+		global $cache_compression, $cache_path;
+
+		$new_cache_compression = 0;
+		if ( defined( 'WPSC_DISABLE_COMPRESSION' ) ) {
+			$cache_compression = 0;
+			wp_cache_setting( 'cache_compression', $cache_compression );
+
+		} else {
+			if ( 1 == $value ) {
+				$new_cache_compression = 1;
+			}
+
+			if ( 1 == ini_get( 'zlib.output_compression' ) || "on" == strtolower( ini_get( 'zlib.output_compression' ) ) ) {
+				return __( "You attempted to enable compression but `zlib.output_compression` is enabled. See #21 in the Troubleshooting section of the readme file.", 'wp-super-cache' );
+			}
+
+			if ( $new_cache_compression != $cache_compression ) {
+				$cache_compression = $new_cache_compression;
+				wp_cache_setting( 'cache_compression', $cache_compression );
+				if ( function_exists( 'prune_super_cache' ) ) {
+					prune_super_cache( $cache_path, true );
+				}
+
+				delete_option( 'super_cache_meta' );
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * @param array $cache_pages
+	 */
+	protected function set_wp_cache_pages( $cache_pages ) {
+		if ( ! is_array( $cache_pages ) ) {
+			return;
+		}
+
+		$_POST['wp_edit_rejected_pages'] = 1;
+
+		foreach ( $cache_pages as $page => $value ) {
+			if ( $value ) {
+				$_POST['wp_cache_pages'][ $page ] = 1;
+			}
+		}
+
+		wp_cache_update_rejected_pages();
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_cache_rejected_uri( $value ) {
+		$_REQUEST['wp_rejected_uri'] = implode( "\n", $value );
+		wp_cache_update_rejected_strings();
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_cache_acceptable_files( $value ) {
+		$_REQUEST['wp_accepted_files'] = implode( "\n", $value );
+		wp_cache_update_accepted_strings();
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_cache_rejected_user_agent( $value ) {
+		$_POST['wp_rejected_user_agent'] = implode( "\n", $value );
+		wp_cache_update_rejected_ua();
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdl_cname( $value ) {
+		update_option( 'ossdl_cname', $value );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdl_off_blog_url( $value ) {
+		update_option( 'ossdl_off_blog_url', untrailingslashit( $value ) );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdl_off_cdn_url( $value ) {
+		update_option( 'ossdl_off_cdn_url', $value );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdl_off_include_dirs( $value ) {
+		update_option( 'ossdl_off_include_dirs', $value == '' ? 'wp-content,wp-includes' : $value );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdl_off_exclude( $value ) {
+		update_option( 'ossdl_off_exclude', $value );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdl_https( $value ) {
+		update_option( 'ossdl_https', $value ? 1 : 0 );
+	}
+
+	/**
+	 * @param mixed $value
+	 */
+	protected function set_ossdlcdn( $value ) {
+		global $wp_cache_config_file;
+
+		$ossdlcdn = $value ? 1 : 0;
+		wp_cache_replace_line( '^ *\$ossdlcdn', "\$ossdlcdn = $ossdlcdn;", $wp_cache_config_file );
+	}
+
+	/**
+	 * @param mixed $value
+	 * @param string $name
+	 */
+	protected function set_time_setting( $value, $name ) {
+		$_POST[ $name ]         = $value;
+		$_POST['_time_setting'] = true;
+	}
+
+	/**
+	 * @param mixed $value
+	 * @param string $name
+	 */
+	protected function set_preload_setting( $value, $name ) {
+		$_POST[ $name ]            = $value;
+		$_POST['_preload_setting'] = true;
+	}
+
+	/**
+	 * Easy caching is a mode that allows the user to press one button and
+	 * enable a sensible default of settings.
+	 *
+	 * @param bool $enabled
+	 */
+	protected function toggle_easy_caching( $enabled = true ) {
+		global $cache_path, $wp_cache_shutdown_gc, $cache_schedule_type;
+		if ( $enabled ) {
+			$settings = array(
+				'wp_cache_mobile_enabled' => 1,
+				'is_cache_enabled'        => 1,
+				'cache_rebuild_files'     => 1,
+				'cache_compression'       => 0,
+			);
+			wp_cache_enable();
+			if ( ! defined( 'DISABLE_SUPERCACHE' ) ) {
+				wp_cache_debug( 'DISABLE_SUPERCACHE is not set, super_cache enabled.' );
+				wp_super_cache_enable();
+			}
+			wpsc_set_default_gc();
+
+		} else {
+			wp_cache_disable();
+			$settings = array( 'is_cache_enabled' => 0 );
+			wp_clear_scheduled_hook( 'wp_cache_check_site_hook' );
+			wp_clear_scheduled_hook( 'wp_cache_gc' );
+			wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
+		}
+
+		foreach ( $settings as $key => $value ) {
+			$this->set_value_by_key( $value, $key );
+		}
+
+		if ( $cache_path != WP_CONTENT_DIR . '/cache/' ) {
+			$this->set_value_by_key( $cache_path, 'wp_cache_location' );
+		}
+
+		$advanced_settings = array(
+			'wp_super_cache_late_init',
+			'wp_cache_disable_utf8',
+			'wp_cache_no_cache_for_get',
+			'wp_supercache_304',
+			'wp_cache_mfunc_enabled',
+			'wp_cache_mobile_enabled',
+			'wp_cache_front_page_checks',
+			'wp_supercache_cache_list',
+			'wp_cache_hello_world',
+			'wp_cache_clear_on_post_edit',
+			'wp_cache_not_logged_in',
+			'wp_cache_make_known_anon',
+			'wp_cache_object_cache',
+			'wp_cache_refresh_single_only',
+			'cache_compression',
+			'wp_cache_mutex_disabled'
+		);
+
+		foreach ( $advanced_settings as $setting ) {
+			global ${$setting};
+
+			$value = ( isset( $$setting ) && $$setting == 1 ) ? 1 : 0;
+			$this->set_value_by_key( $value, $setting );
+		}
+	}
+
+	/**
+	 * Runs at the end and saves the time settings.
+	 */
+	protected function save_time_settings( $parameters ) {
+		if ( ! isset( $_POST['_time_setting'] ) || true !== $_POST['_time_setting'] ) {
+			return;
+		}
+
+		$_POST['action'] = 'expirytime';
+
+		$all_time_settings = array(
+			'cache_max_time',
+			'cache_schedule_type',
+			'cache_scheduled_time',
+			'cache_schedule_interval',
+			'cache_time_interval',
+			'cache_gc_email_me'
+		);
+
+		foreach ( $all_time_settings as $time_setting ) {
+			global ${$time_setting};
+			if ( false == isset( $_POST[ $time_setting ] ) || $$time_setting == $_POST[ $time_setting ] ) {
+				$_POST[ $time_setting ] = $$time_setting; // fill in the potentially missing fields before updating GC settings.
+			}
+		}
+
+		if ( isset( $parameters['cache_gc_email_me'] ) && $parameters['cache_gc_email_me'] == 0 ) {
+			unset( $_POST['cache_gc_email_me'] );
+		}
+		$_POST[ 'wp_max_time' ] = $_POST[ 'cache_max_time' ];
+
+		wp_cache_time_update();
+	}
+
+
+	/**
+	 * set the cached direct pages list.
+	 */
+	protected function set_cache_direct_pages( $list ) {
+		if ( is_array( $list ) == false ) {
+			return false;
+		}
+
+		$_POST[ 'direct_pages' ] = $list;
+		wpsc_update_direct_pages();
+	}
+
+	/**
+	 * add an entry to the cached direct pages list.
+	 */
+	protected function new_direct_page( $value ) {
+		global $cached_direct_pages;
+
+		if ( isset( $_POST[ 'direct_pages' ] ) == false ) {
+			$_POST[ 'direct_pages' ] = $cached_direct_pages;
+		}
+
+		$_POST[ 'new_direct_page' ] = $value;
+		wpsc_update_direct_pages();
+	}
+
+	/**
+	 * Runs at the end and saves the preload settings.
+	 */
+	protected function save_preload_settings() {
+		if ( ! isset( $_POST['_preload_setting'] ) || true !== $_POST['_preload_setting'] ) {
+			return;
+		}
+
+		$_POST['action'] = 'preload';
+
+		$all_preload_settings = array(
+			'preload_interval'     => 'wp_cache_preload_interval',
+			'preload_on'           => 'wp_cache_preload_on',
+			'preload_taxonomies'   => 'wp_cache_preload_taxonomies',
+			'preload_email_volume' => 'wp_cache_preload_email_volume',
+			'preload_posts'        => 'wp_cache_preload_posts',
+		);
+
+		foreach ( $all_preload_settings as $key => $original ) {
+			if ( ! isset( $_POST[ $key ] ) ) {
+				global ${$original};
+				$_POST[ $original ] = $$original;
+			} else {
+				$_POST[ $original ] = $_POST[ $key ];
+				if ( $key !== 'preload_interval' && ( $_POST[ $key ] === 0 || $_POST[ $key ] === false ) ) {
+					unset( $_POST[ $original ] );
+				}
+
+			}
+		}
+
+		wpsc_preload_settings();
+	}
+
+	/*
+	 * Delete the plugin configuration file and restore the sample one.
+	 */
+	protected function restore_default_settings( $parameters ) {
+		global $wp_cache_config_file, $wp_cache_config_file_sample;
+
+		if ( file_exists( $wp_cache_config_file_sample ) ) {
+			copy( $wp_cache_config_file_sample, $wp_cache_config_file );
+			$cache_page_secret = md5( date( 'H:i:s' ) . mt_rand() );
+			wp_cache_setting( 'cache_page_secret', $cache_page_secret );
+
+			if ( function_exists( "opcache_invalidate" ) ) {
+				opcache_invalidate( $wp_cache_config_file );
+			}
+		}
+		wpsc_set_default_gc( true );
+
+	}
+
+	/**
+	 * Update the debug settings.
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|WP_REST_Response
+	 */
+	public function set_debug_settings( $parameters ) {
+
+		$settings = array (
+			'wp_super_cache_debug',
+			'wp_cache_debug_ip',
+			'wp_super_cache_comments',
+			'wp_super_cache_front_page_check',
+			'wp_super_cache_front_page_clear',
+			'wp_super_cache_front_page_text',
+			'wp_super_cache_front_page_notification',
+			'wpsc_delete_log',
+		);
+
+		foreach( $settings as $setting ) {
+			if ( isset( $parameters[ $setting ] ) ) {
+				if ( $parameters[ $setting ] != false ) {
+					$_POST[ $setting ] = $parameters[ $setting ];
+				}
+				$_POST[ 'wp_cache_debug' ] = 1;
+			} else {
+				global $$setting;
+				$_POST[ $setting ] = $$setting;
+			}
+		}
+		global $valid_nonce;
+		$valid_nonce = true;
+
+		$settings = wpsc_update_debug_settings();
+	}
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-settings-map.php b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-settings-map.php
new file mode 100644
index 0000000000000000000000000000000000000000..9e8ed0644688492ee0199cb7506628e23aca1e11
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/class.wp-super-cache-settings-map.php
@@ -0,0 +1,263 @@
+<?php
+
+class WP_Super_Cache_Settings_Map {
+	/**
+	 * A map describing how settings transform from their external names
+	 * into internal methods and globals.
+	 *
+	 * Key definitions:
+	 *
+	 * - get: A getter method or function that will be called to return the var
+	 * - set: A setter method or function that will be called to set the var
+	 * - option: An option name that will be used to get or set the var
+	 * - global: A name of a global that can GET
+	 *
+	 * @var array
+	 */
+	public static $map = array(
+		'is_submit_enabled' => array(
+			'get' => 'get_is_submit_enabled',
+			'set' => '',
+		),
+		'is_preload_enabled' => array(
+			'get' => 'get_is_preload_enabled',
+			'set' => '',
+		),
+		'cache_lock_down' => array(
+			'get' => 'get_is_lock_down_enabled',
+			'set' => 'set_lock_down',
+		),
+		'cache_next_gc' => array(
+			'get' => 'get_next_gc',
+			'set' => '',
+		),
+		'cache_gc_email_me' => array(
+			'global' => 'cache_gc_email_me',
+			'set' => 'set_time_setting',
+		),
+		'cache_path_url' => array(
+			'get' => 'get_cache_path_url',
+		),
+		'cache_type' => array(
+			'get' => 'get_cache_type',
+			'set' => 'set_super_cache_enabled',
+		),
+		'is_preloading' => array(
+			'get' => 'wpsc_is_preloading',
+			'set' => '',
+		),
+		'post_count' => array(
+			'get' => 'get_post_count',
+			'set' => '',
+		),
+		'is_cache_enabled' => array(
+			'global' => 'cache_enabled',
+			'set'    => 'set_cache_enabled',
+		),
+		'is_super_cache_enabled' => array(
+			'global' => 'super_cache_enabled',
+			'set'    => 'set_super_cache_enabled',
+		),
+		'is_mobile_enabled' => array(
+			'global' => 'wp_cache_mobile_enabled',
+		),
+		'is_mfunc_enabled' => array(
+			'global' => 'wp_cache_mfunc_enabled',
+		),
+		'cache_list' => array(
+			'global' => 'wp_supercache_cache_list',
+		),
+		'clear_cache_on_post_edit' => array(
+			'global' => 'wp_cache_clear_on_post_edit',
+		),
+		'wpsc_save_headers' => array(
+			'global' => 'wpsc_save_headers',
+		),
+		'cache_rebuild' => array(
+			'global' => 'cache_rebuild_files',
+		),
+		'dont_cache_logged_in' => array(
+			'global' => 'wp_cache_not_logged_in',
+		),
+		'make_known_anon' => array(
+			'global' => 'wp_cache_make_known_anon',
+		),
+		'cache_path' => array(
+			'global' => 'cache_path',
+			'set'    => 'set_wp_cache_location',
+		),
+		'default_cache_path' => array(
+			'get' => 'get_default_cache_path',
+		),
+		'use_object_cache' => array(
+			'global' => 'wp_cache_object_cache',
+		),
+		'refresh_current_only_on_comments' => array(
+			'global' => 'wp_cache_refresh_single_only',
+		),
+		'cache_compression' => array(
+			'global' => 'cache_compression',
+			'set'    => 'set_cache_compression',
+		),
+		'cache_mod_rewrite' => array(
+			'global' => 'wp_cache_mod_rewrite',
+		),
+		'use_304_headers' => array(
+			'global' => 'wp_supercache_304',
+		),
+		'cache_late_init' => array(
+			'global' => 'wp_super_cache_late_init',
+		),
+		'front_page_checks' => array(
+			'global' => 'wp_cache_front_page_checks',
+		),
+		'cache_page_secret' => array(
+			'global' => 'cache_page_secret',
+		),
+		'disable_utf8' => array(
+			'global' => 'wp_cache_disable_utf8',
+		),
+		'no_cache_for_get' => array(
+			'global' => 'wp_cache_no_cache_for_get',
+		),
+		'cache_schedule_type' => array(
+			'global' => 'cache_schedule_type',
+			'set' => 'set_time_setting',
+		),
+		'cache_scheduled_time' => array(
+			'global' => 'cache_scheduled_time',
+			'set' => 'set_time_setting',
+		),
+		'cache_max_time' => array(
+			'global' => 'cache_max_time',
+			'set' => 'set_time_setting',
+		),
+		'cache_time_interval' => array(
+			'global' => 'cache_time_interval',
+			'set' => 'set_time_setting',
+		),
+		'shutdown_garbage_collector' => array(
+			'global' => 'wp_cache_shutdown_gc',
+		),
+		'pages' => array(
+			'global' => 'wp_cache_pages',
+		),
+		'minimum_preload_interval' => array(
+			'get' => 'get_minimum_preload_interval',
+		),
+		'preload_interval' => array(
+			'global' => 'wp_cache_preload_interval',
+			'set' => 'set_preload_setting',
+		),
+		'preload_posts' => array(
+			'global' => 'wp_cache_preload_posts',
+			'set' => 'set_preload_setting',
+		),
+		'preload_on' => array(
+			'global' => 'wp_cache_preload_on',
+			'set' => 'set_preload_setting',
+		),
+		'preload_active' => array(
+			'get' => 'get_is_preload_active',
+		),
+		'preload_taxonomies' => array(
+			'global' => 'wp_cache_preload_taxonomies',
+			'set' => 'set_preload_setting',
+		),
+		'preload_email_me' => array(
+			'global' => 'wp_cache_preload_email_me',
+			'set' => 'set_preload_setting',
+		),
+		'preload_email_volume' => array(
+			'global' => 'wp_cache_preload_email_volume',
+			'set' => 'set_preload_setting',
+		),
+		'cache_mobile_browsers' => array(
+			'global' => 'wp_cache_mobile_browsers',
+		),
+		'cache_mobile_prefixes' => array(
+			'global' => 'wp_cache_mobile_prefixes',
+		),
+		'cache_disable_locking' => array(
+			'global' => 'wp_cache_mutex_disabled',
+		),
+		'cache_hello_world' => array(
+			'global' => 'wp_cache_hello_world',
+		),
+		'cache_schedule_interval' => array(
+			'global' => 'cache_schedule_interval',
+			'set' => 'set_time_setting',
+		),
+		'cache_acceptable_files' => array(
+			'global' => 'cache_acceptable_files',
+		),
+		'cache_rejected_uri' => array(
+			'global' => 'cache_rejected_uri',
+		),
+		'cache_rejected_user_agent' => array(
+			'global' => 'cache_rejected_user_agent',
+		),
+		'cache_direct_pages' => array(
+			'global' => 'cached_direct_pages',
+			'set'    => 'set_cache_direct_pages',
+		),
+		'new_direct_page' => array(
+			'set' => 'new_direct_page',
+		),
+		'ossdl_cname' => array(
+			'option' => 'ossdl_cname',
+			'set'    => 'set_ossdl_cname',
+		),
+		'ossdl_https' => array(
+			'option' => 'ossdl_https',
+			'set'    => 'set_ossdl_https',
+		),
+		'ossdl_off_cdn_url' => array(
+			'option' => 'ossdl_off_cdn_url',
+			'set'    => 'set_ossdl_off_cdn_url',
+		),
+		'ossdl_off_blog_url' => array(
+			'option' => 'ossdl_off_blog_url',
+			'set'    => 'set_ossdl_off_blog_url',
+		),
+		'ossdl_off_exclude' => array(
+			'option' => 'ossdl_off_exclude',
+			'set'    => 'set_ossdl_off_exclude',
+		),
+		'ossdl_off_include_dirs' => array(
+			'option' => 'ossdl_off_include_dirs',
+			'set'    => 'set_ossdl_off_include_dirs',
+		),
+		'ossdlcdn' => array(
+			'global' => 'ossdlcdn',
+			'set'    => 'set_ossdlcdn',
+		),
+		'wp_super_cache_debug' => array(
+			'global' => 'wp_super_cache_debug',
+		),
+		'wp_cache_debug_username' => array(
+			'global' => 'wp_cache_debug_username',
+		),
+		'wp_cache_debug_log' => array(
+			'global'    => 'wp_cache_debug_log',
+		),
+		'wp_cache_debug_ip' => array(
+			'global' => 'wp_cache_debug_ip',
+		),
+		'wp_super_cache_comments' => array(
+			'global' => 'wp_super_cache_comments',
+		),
+		'wp_super_cache_front_page_check' => array(
+			'global' => 'wp_super_cache_front_page_check',
+		),
+		'wp_super_cache_front_page_clear' => array(
+			'global' => 'wp_super_cache_front_page_clear',
+		),
+		'wp_super_cache_front_page_text' => array(
+			'global' => 'wp_super_cache_front_page_text',
+		),
+		'wp_super_cache_front_page_notification' => array(
+			'global' => 'wp_super_cache_front_page_notification',
+		),
+	);
+}
diff --git a/wp-content/plugins/wp-super-cache/rest/load.php b/wp-content/plugins/wp-super-cache/rest/load.php
new file mode 100644
index 0000000000000000000000000000000000000000..75e0816298639e5671ec4ea61fa567a9c6d4e496
--- /dev/null
+++ b/wp-content/plugins/wp-super-cache/rest/load.php
@@ -0,0 +1,149 @@
+<?php
+
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-get-settings.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-update-settings.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-get-stats.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-get-cache.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-get-status.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-test-cache.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-delete-cache.php' );
+require_once( dirname( __FILE__ ) . '/class.wp-super-cache-rest-preload.php' );
+
+class WP_Super_Cache_Router {
+
+	/**
+	 * Register the routes for the objects of the controller.
+	 *
+	 * GET /wp-super-cache/v1/settings
+	 * POST /wp-super-cache/v1/settings
+	 * GET /wp-super-cache/v1/stats
+	 * GET /wp-super-cache/v1/cache
+	 * POST /wp-super-cache/v1/cache
+	 */
+	public static function register_routes() {
+		$version = '1';
+		$namespace = 'wp-super-cache/v' . $version;
+
+		$get_settings    = new WP_Super_Cache_Rest_Get_Settings();
+		$update_settings = new WP_Super_Cache_Rest_Update_Settings();
+		$get_stats       = new WP_Super_Cache_Rest_Get_Stats();
+		$get_cache       = new WP_Super_Cache_Rest_Get_Cache();
+		$test_cache 	 = new WP_Super_Cache_Rest_Test_Cache();
+		$delete_cache 	 = new WP_Super_Cache_Rest_Delete_Cache();
+		$preload_cache   = new WP_Super_Cache_Rest_Preload();
+		$get_status 	 = new WP_Super_Cache_Rest_Get_Status();
+
+		register_rest_route( $namespace, '/settings', array(
+			array(
+				'methods'        	  => WP_REST_Server::READABLE,
+				'callback'       	  => array( $get_settings, 'callback' ),
+				'permission_callback' => __CLASS__ . '::get_item_permissions_check',
+				'args'            	  => array(),
+			),
+			array(
+				'methods'         	  => WP_REST_Server::CREATABLE,
+				'callback'        	  => array( $update_settings, 'callback' ),
+				'permission_callback' => __CLASS__ . '::update_item_permissions_check',
+				'args'           	  => array(),
+			),
+		) );
+
+		register_rest_route( $namespace, '/status', array(
+			'methods'             => WP_REST_Server::READABLE,
+			'callback'        	  => array( $get_status, 'callback' ),
+			'permission_callback' => __CLASS__ . '::get_item_permissions_check',
+		) );
+
+		register_rest_route( $namespace, '/stats', array(
+			'methods'             => WP_REST_Server::READABLE,
+			'callback'        	  => array( $get_stats, 'callback' ),
+			'permission_callback' => __CLASS__ . '::get_item_permissions_check',
+		) );
+
+		register_rest_route( $namespace, '/cache', array(
+			array(
+				'methods'         	  => WP_REST_Server::READABLE,
+				'callback'        	  => array( $get_cache, 'callback' ),
+				'permission_callback' => __CLASS__ . '::get_item_permissions_check',
+				'args'            	  => array(),
+			),
+			array(
+				'methods'         	  => WP_REST_Server::CREATABLE,
+				'callback'        	  => array( $delete_cache, 'callback' ),
+				'permission_callback' => __CLASS__ . '::delete_item_permissions_check',
+				'args'           	  => array(),
+			),
+		) );
+
+		register_rest_route( $namespace, '/preload', array(
+			'methods'             => WP_REST_Server::CREATABLE,
+			'callback'            => array( $preload_cache, 'callback' ),
+			'permission_callback' => __CLASS__ . '::update_item_permissions_check',
+		) );
+
+		register_rest_route( $namespace, '/cache/test', array(
+			'methods'             => WP_REST_Server::CREATABLE,
+			'callback'        	  => array( $test_cache, 'callback' ),
+			'permission_callback' => __CLASS__ . '::create_item_permissions_check',
+		) );
+
+	}
+
+	/**
+	 * Check if a given request has access to get items
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|bool
+	 */
+	public static function get_items_permissions_check( $request ) {
+		return wpsupercache_site_admin();
+	}
+
+	/**
+	 * Check if a given request has access to get a specific item
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|bool
+	 */
+	public static function get_item_permissions_check( $request ) {
+		return self::get_items_permissions_check( $request );
+	}
+
+	/**
+	 * Check if a given request has access to create items
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|bool
+	 */
+	public static function create_item_permissions_check( $request ) {
+		return self::get_items_permissions_check( $request );
+	}
+
+	/**
+	 * Check if a given request has access to update a specific item
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|bool
+	 */
+	public static function update_item_permissions_check( $request ) {
+		return self::create_item_permissions_check( $request );
+	}
+
+	/**
+	 * Check if a given request has access to update a specific item
+	 *
+	 * @param WP_REST_Request $request Full data about the request.
+	 * @return WP_Error|bool
+	 */
+	public static function delete_item_permissions_check( $request ) {
+		return self::update_item_permissions_check( $request );
+	}
+
+}
+
+function wpsc_load_rest_api() {
+	$wpsupercache_route = new WP_Super_Cache_Router;
+	$wpsupercache_route->register_routes();
+};
+
+add_action( 'rest_api_init', 'wpsc_load_rest_api' );
diff --git a/wp-content/plugins/wp-super-cache/wp-cache-base.php b/wp-content/plugins/wp-super-cache/wp-cache-base.php
index f08240243d7e1561a3fe8467b19e800602297c44..f32a204065295d2c75b7a57a0a35be6d77adb103 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-base.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-base.php
@@ -1,7 +1,10 @@
 <?php
-$known_headers = array("Last-Modified", "Expires", "Content-Type", "Content-type", "X-Pingback", "ETag", "Cache-Control", "Pragma");
-
-$WPSC_HTTP_HOST = htmlentities( $_SERVER[ 'HTTP_HOST' ] );
+if ( false == isset( $_SERVER[ 'HTTP_HOST' ] ) ) {
+	$cache_enabled = false;
+	$WPSC_HTTP_HOST = '';
+} else {
+	$WPSC_HTTP_HOST = htmlentities( $_SERVER[ 'HTTP_HOST' ] );
+}
 
 // We want to be able to identify each blog in a WordPress MU install
 $blogcacheid = '';
diff --git a/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php b/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php
index bdeff63b7d76d29cb919baf7ec5a2c02737a01ce..fccb848d4f9d7da27f22127097cbe1b7af1e1a2d 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php
@@ -10,7 +10,7 @@ if ( ! defined('WPCACHEHOME') )
 
 $cache_compression = 0; // Super cache compression
 $cache_enabled = false;
-$super_cache_enabled = false;
+$super_cache_enabled = true;
 $cache_max_time = 3600; //in seconds
 //$use_flock = true; // Set it true or false if you know what to use
 $cache_path = WP_CONTENT_DIR . '/cache/';
@@ -79,4 +79,23 @@ $wp_cache_clear_on_post_edit = 0;
 $wp_cache_hello_world = 0;
 $wp_cache_mobile_enabled = 0;
 $wp_cache_cron_check = 0;
+$wp_cache_mfunc_enabled = 0;
+$wp_cache_make_known_anon = 0;
+$wp_cache_refresh_single_only = 0;
+$wp_cache_mod_rewrite = 0;
+$wp_supercache_304 = 0;
+$wp_cache_front_page_checks = 0;
+$wp_cache_disable_utf8 = 0;
+$wp_cache_no_cache_for_get = 0;
+$cache_scheduled_time = "00:00";
+$wp_cache_preload_interval = 600;
+$cache_schedule_type = 'interval';
+$wp_cache_preload_posts = 0;
+$wp_cache_preload_on = 0;
+$wp_cache_preload_taxonomies = 0;
+$wp_cache_preload_email_me = 0;
+$wp_cache_preload_email_volume = 'none';
+$wp_cache_mobile_prefixes = '';
+$cached_direct_pages = array();
+$wpsc_served_header = false;
 ?>
diff --git a/wp-content/plugins/wp-super-cache/wp-cache-phase1.php b/wp-content/plugins/wp-super-cache/wp-cache-phase1.php
index 6fd1ae3f999785bfbea4b07f5c4dcad8f0638ac2..fcd73cb4583ad4acadc1ac7b3e98b957b58e210b 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-phase1.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-phase1.php
@@ -4,12 +4,16 @@
 if( !defined('WP_CONTENT_DIR') )
 	define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
 
-if( !include( WP_CONTENT_DIR . '/wp-cache-config.php' ) )
+if( !@include( WP_CONTENT_DIR . '/wp-cache-config.php' ) )
 	return false;
 
 if( !defined( 'WPCACHEHOME' ) )
 	define('WPCACHEHOME', dirname(__FILE__).'/');
 
+if ( defined( 'DISABLE_SUPERCACHE' ) ) {
+	wp_cache_debug( 'DISABLE_SUPERCACHE set, super_cache disabled.' );
+	$super_cache_enabled = 0;
+}
 
 include( WPCACHEHOME . 'wp-cache-base.php');
 
@@ -42,6 +46,11 @@ if( is_array( $plugins ) ) {
 	}
 }
 
+if ( $wp_cache_not_logged_in && wp_cache_get_cookies_values() ) {
+	wp_cache_debug( 'Caching disabled for logged in users on settings page.' );
+	return true;
+}
+
 if ( isset( $wp_cache_make_known_anon ) && $wp_cache_make_known_anon )
 	wp_supercache_cache_for_admins();
 
@@ -73,6 +82,9 @@ if ($cache_compression) {
 }
 
 add_cacheaction( 'supercache_filename_str', 'wp_cache_check_mobile' );
+if ( function_exists( 'add_filter' ) ) { // loaded since WordPress 4.6
+	add_filter( 'supercache_filename_str', 'wp_cache_check_mobile' );
+}
 
 $wp_cache_request_uri = $_SERVER[ 'REQUEST_URI' ]; // Cache this in case any plugin modifies it.
 
@@ -105,11 +117,11 @@ function get_wp_cache_key( $url = false ) {
 		$url = $wp_cache_request_uri;
 	}
 	$server_port = isset( $_SERVER[ 'SERVER_PORT' ] ) ? intval( $_SERVER[ 'SERVER_PORT' ] ) : 0;
-	return do_cacheaction( 'wp_cache_key', $WPSC_HTTP_HOST . $server_port . preg_replace('/#.*$/', '', str_replace( '/index.php', '/', $url ) ) . $wp_cache_gzip_encoding . wp_cache_get_cookies_values() );
+	return do_cacheaction( 'wp_cache_key', wp_cache_check_mobile( $WPSC_HTTP_HOST . $server_port . preg_replace('/#.*$/', '', str_replace( '/index.php', '/', $url ) ) . $wp_cache_gzip_encoding . wp_cache_get_cookies_values() ) );
 }
 
 function wp_super_cache_init() {
-	global $wp_cache_key, $key, $blogcacheid, $wp_cache_request_uri, $file_prefix, $blog_cache_dir, $meta_file, $cache_file, $cache_filename, $meta_pathname, $wp_cache_gzip_encoding, $meta;
+	global $wp_cache_key, $key, $blogcacheid, $file_prefix, $blog_cache_dir, $meta_file, $cache_file, $cache_filename, $meta_pathname;
 
 	$wp_cache_key = get_wp_cache_key();
 	$key = $blogcacheid . md5( $wp_cache_key );
@@ -117,17 +129,20 @@ function wp_super_cache_init() {
 
 	$cache_filename = $file_prefix . $key . '.php';
 	$meta_file = $file_prefix . $key . '.php';
-	$cache_file = realpath( $blog_cache_dir . $cache_filename );
-	$meta_pathname = realpath( $blog_cache_dir . 'meta/' . $meta_file );
+	$cache_file = wpsc_get_realpath( $blog_cache_dir . $cache_filename );
+	$meta_pathname = wpsc_get_realpath( $blog_cache_dir . 'meta/' . $meta_file );
 	return compact( 'key', 'cache_filename', 'meta_file', 'cache_file', 'meta_pathname' );
 }
 
 function wp_cache_serve_cache_file() {
 	global $key, $blogcacheid, $wp_cache_request_uri, $file_prefix, $blog_cache_dir, $meta_file, $cache_file, $cache_filename, $meta_pathname, $wp_cache_gzip_encoding, $meta;
 	global $wp_cache_object_cache, $cache_compression, $wp_cache_slash_check, $wp_supercache_304, $wp_cache_home_path, $wp_cache_no_cache_for_get;
-	global $wp_cache_disable_utf8, $wp_cache_mfunc_enabled;
+	global $wp_cache_disable_utf8, $wp_cache_mfunc_enabled, $wpsc_served_header;
 
-	extract( wp_super_cache_init() );
+	if ( is_admin() ) {
+		wp_cache_debug( 'Not serving wp-admin requests.', 5 );
+		return false;
+	}
 
 	if ( wp_cache_user_agent_is_rejected() ) {
 		wp_cache_debug( "No wp-cache file served as user agent rejected.", 5 );
@@ -139,6 +154,8 @@ function wp_cache_serve_cache_file() {
 		return false;
 	}
 
+	extract( wp_super_cache_init() ); // $key, $cache_filename, $meta_file, $cache_file, $meta_pathname
+
 	if ( $wp_cache_object_cache && wp_cache_get_cookies_values() == '' ) {
 		if ( !empty( $_GET ) ) {
 			wp_cache_debug( "Non empty GET request. Not serving request from object cache. " . json_encode( $_GET ), 1 );
@@ -157,7 +174,15 @@ function wp_cache_serve_cache_file() {
 			wp_cache_debug( "Meta array from object cache corrupt. Ignoring cache.", 1 );
 			return true;
 		}
-	} elseif ( file_exists( $cache_file ) ) {
+	} elseif ( ( $cache_file && file_exists( $cache_file ) ) || file_exists( get_current_url_supercache_dir() . 'meta-' . $cache_filename ) ) {
+		if ( file_exists( get_current_url_supercache_dir() . 'meta-' . $cache_filename ) ) {
+			$cache_file = get_current_url_supercache_dir() . $cache_filename;
+			$meta_pathname = get_current_url_supercache_dir() . 'meta-' . $cache_filename;
+		} elseif ( !file_exists( $cache_file ) ) {
+			wp_cache_debug( "wp_cache_serve_cache_file: found cache file but then it disappeared!" );
+			return false;
+		}
+
 		wp_cache_debug( "wp-cache file exists: $cache_file", 5 );
 		if ( !( $meta = json_decode( wp_cache_get_legacy_cache( $meta_pathname ), true ) ) ) {
 			wp_cache_debug( "couldn't load wp-cache meta file", 5 );
@@ -169,7 +194,23 @@ function wp_cache_serve_cache_file() {
 			@unlink( $cache_file );
 			return true;
 		}
-	} else {
+		// check for updated feed
+		if ( isset( $meta[ 'headers' ][ 'Content-Type' ] ) ) {
+			$rss_types = apply_filters( 'wpsc_rss_types', array( 'application/rss+xml', 'application/rdf+xml', 'application/atom+xml' ) );
+			foreach( $rss_types as $rss_type ) {
+				if ( strpos( $meta[ 'headers' ][ 'Content-Type' ], $rss_type ) ) {
+					global $wpsc_last_post_update;
+					if ( isset( $wpsc_last_post_update ) && filemtime( $meta_pathname ) < $wpsc_last_post_update ) {
+						wp_cache_debug( "wp_cache_serve_cache_file: feed out of date. deleting cache files: $meta_pathname, $cache_file" );
+						@unlink( $meta_pathname );
+						@unlink( $cache_file );
+						return true;
+					}
+				}
+			}
+		}
+	} else { // no $cache_file
+		global $wpsc_save_headers;
 		// last chance, check if a supercache file exists. Just in case .htaccess rules don't work on this host
 		$filename = supercache_filename();
 		$file = get_current_url_supercache_dir() . $filename;
@@ -182,6 +223,9 @@ function wp_cache_serve_cache_file() {
 		} elseif ( wp_cache_get_cookies_values() != '' ) {
 			wp_cache_debug( "Cookies found. Cannot serve a supercache file. " . wp_cache_get_cookies_values() );
 			return false;
+		} elseif ( isset( $wpsc_save_headers ) && $wpsc_save_headers ) {
+			wp_cache_debug( "Saving headers. Cannot serve a supercache file." );
+			return false;
 		}
 
 		if ( isset( $wp_cache_mfunc_enabled ) == false )
@@ -223,28 +267,37 @@ function wp_cache_serve_cache_file() {
 
 			header( "Vary: Accept-Encoding, Cookie" );
 			header( "Cache-Control: max-age=3, must-revalidate" );
-			header( "WP-Super-Cache: Served supercache file from PHP" );
 			$size = function_exists( 'mb_strlen' ) ? mb_strlen( $cachefiledata, '8bit' ) : strlen( $cachefiledata );
 			if ( $wp_cache_gzip_encoding ) {
+				if ( isset( $wpsc_served_header ) && $wpsc_served_header ) {
+					header( "X-WP-Super-Cache: Served supercache gzip file from PHP" );
+				}
 				header( 'Content-Encoding: ' . $wp_cache_gzip_encoding );
 				header( 'Content-Length: ' . $size );
 			} elseif ( $wp_supercache_304 ) {
+				if ( isset( $wpsc_served_header ) && $wpsc_served_header ) {
+					header( "X-WP-Super-Cache: Served supercache 304 file from PHP" );
+				}
 				header( 'Content-Length: ' . $size );
+			} else {
+				if ( isset( $wpsc_served_header ) && $wpsc_served_header ) {
+					header( "X-WP-Super-Cache: Served supercache file from PHP" );
+				}
 			}
 
 			// don't try to match modified dates if using dynamic code.
 			if ( $wp_cache_mfunc_enabled == 0 && $wp_supercache_304 ) {
 				if ( function_exists( 'apache_request_headers' ) ) {
 					$request = apache_request_headers();
-					$remote_mod_time = ( isset ( $request[ 'If-Modified-Since' ] ) ) ? $request[ 'If-Modified-Since' ] : 0;
+					$remote_mod_time = ( isset ( $request[ 'If-Modified-Since' ] ) ) ? $request[ 'If-Modified-Since' ] : null;
 				} else {
 					if ( isset( $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ] ) )
 						$remote_mod_time = $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ];
 					else
-						$remote_mod_time = 0;
+						$remote_mod_time = null;
 				}
 				$local_mod_time = gmdate("D, d M Y H:i:s",filemtime( $file )).' GMT';
-				if ( $remote_mod_time != 0 && $remote_mod_time == $local_mod_time ) {
+				if ( !is_null($remote_mod_time) && $remote_mod_time == $local_mod_time ) {
 					header("HTTP/1.0 304 Not Modified");
 					exit();
 				}
@@ -271,7 +324,9 @@ function wp_cache_serve_cache_file() {
 		if( strpos( $header, 'Last-Modified:' ) === false )
 			header($header);
 	}
-	header( 'WP-Super-Cache: Served legacy cache file' );
+	if ( isset( $wpsc_served_header ) && $wpsc_served_header ) {
+		header( 'X-WP-Super-Cache: Served WPCache cache file' );
+	}
 	if ( $wp_cache_object_cache ) {
 		if ( $cache ) {
 			if ( $ungzip ) {
@@ -335,7 +390,7 @@ function wp_cache_get_legacy_cache( $cache_file ) {
 }
 
 if(defined('DOING_CRON')) {
-	extract( wp_super_cache_init() );
+	extract( wp_super_cache_init() ); // $key, $cache_filename, $meta_file, $cache_file, $meta_pathname
 	return true;
 }
 
@@ -372,11 +427,15 @@ function wp_cache_get_cookies_values() {
 		return $string;
 	}
 
-	$regex = "/^wp-postpass|^comment_author_";
+	if ( defined( 'COOKIEHASH' ) )
+		$cookiehash = preg_quote( constant( 'COOKIEHASH' ) );
+	else
+		$cookiehash = '';
+	$regex = "/^wp-postpass_$cookiehash|^comment_author_$cookiehash";
 	if ( defined( 'LOGGED_IN_COOKIE' ) )
 		$regex .= "|^" . preg_quote( constant( 'LOGGED_IN_COOKIE' ) );
 	else
-		$regex .= "|^wordpress_logged_in_";
+		$regex .= "|^wordpress_logged_in_$cookiehash";
 	$regex .= "/";
 	while ($key = key($_COOKIE)) {
 		if ( preg_match( $regex, $key ) ) {
@@ -615,12 +674,137 @@ function get_current_url_supercache_dir( $post_id = 0 ) {
 	return $dir;
 }
 
+/*
+ * Delete (or rebuild) all the files in one directory.
+ * Checks if it is in the cache directory but doesn't allow files in the following directories to be deleted:
+ * wp-content/cache/
+ * wp-content/cache/blogs/
+ * wp-content/cache/supercache/
+ *
+ */
+function wpsc_rebuild_files( $dir ) {
+	return wpsc_delete_files( $dir, false );
+}
+
+// realpath() doesn't always remove the trailing slash
+function wpsc_get_realpath( $directory ) {
+	if ( $directory == '/' ) {
+		return false;
+	}
+
+	$original_dir = $directory;
+	$directory = realpath( $directory );
+
+	if ( ! $directory ) {
+		wp_cache_debug( "wpsc_get_realpath: directory does not exist - $original_dir" );
+		return false;
+	}
+
+	if ( substr( $directory, -1 ) == '/' || substr( $directory, -1 ) == '\\' ) {
+		$directory = substr( $directory, 0, -1 ); // remove trailing slash
+	}
+
+	return $directory;
+}
+
+// return true if directory is in the cache directory
+function wpsc_is_in_cache_directory( $directory ) {
+	global $cache_path;
+	static $rp_cache_path = '';
+
+	if ( $directory == '' ) {
+		wp_cache_debug( "wpsc_is_in_cache_directory: exiting as directory is blank" );
+		return false;
+	}
+
+	if ( $cache_path == '' ) {
+		wp_cache_debug( "wpsc_is_in_cache_directory: exiting as cache_path is blank" );
+		return false;
+	}
+
+	if ( $rp_cache_path == '' ) {
+		$rp_cache_path = wpsc_get_realpath( $cache_path );
+	}
+
+	if ( ! $rp_cache_path ) {
+		wp_cache_debug( "wpsc_is_in_cache_directory: exiting as cache_path directory does not exist" );
+		return false;
+	}
+
+	$directory = wpsc_get_realpath( $directory );
+
+	if ( ! $directory ) {
+		wp_cache_debug( "wpsc_is_in_cache_directory: directory does not exist" );
+		return false;
+	}
+
+	if ( substr( $directory, 0, strlen( $rp_cache_path ) ) == $rp_cache_path ) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function wpsc_delete_files( $dir, $delete = true ) {
+	global $cache_path;
+	static $protected = '';
+
+	if ( $dir == '' ) {
+		wp_cache_debug( "wpsc_delete_files: directory is blank" );
+		return false;
+	}
+
+	// only do this once, this function will be called many times
+	if ( $protected == '' ) {
+		$protected = array( $cache_path, $cache_path . "blogs/", $cache_path . 'supercache' );
+		foreach( $protected as $id => $directory ) {
+			$protected[ $id ] = trailingslashit( wpsc_get_realpath( $directory ) );
+		}
+	}
+
+	$dir = wpsc_get_realpath( $dir );
+	if ( ! $dir ) {
+		wp_cache_debug( "wpsc_delete_files: directory does not exist" );
+		return false;
+	}
+
+	$dir = trailingslashit( $dir );
+
+	if ( ! wpsc_is_in_cache_directory( $dir ) ) {
+		return false;
+	}
+
+	if ( in_array( $dir, $protected ) )
+		return false;
+
+	if ( is_dir( $dir ) && $dh = @opendir( $dir ) ) {
+		while ( ( $file = readdir( $dh ) ) !== false ) {
+			if ( $file != '.' && $file != '..' && $file != '.htaccess' && is_file( $dir . $file ) )
+				if ( $delete )
+					@unlink( $dir . $file );
+				else
+					@wp_cache_rebuild_or_delete( $dir . $file );
+		}
+		closedir( $dh );
+
+		if ( $delete )
+			@rmdir( $dir );
+	}
+	return true;
+}
+
 function get_all_supercache_filenames( $dir = '' ) {
 	global $wp_cache_mobile_enabled, $cache_path;
 
-	$dir = realpath( $dir );
-	if ( substr( $dir, 0, strlen( $cache_path ) ) != $cache_path )
+	$dir = wpsc_get_realpath( $dir );
+	if ( ! $dir ) {
+		wp_cache_debug( "get_all_supercache_filenames: directory does not exist" );
 		return array();
+	}
+
+	if ( ! wpsc_is_in_cache_directory( $dir ) ) {
+		return array();
+	}
 
 	$filenames = array( 'index.html', 'index-https.html', 'index.html.php' );
 
@@ -650,6 +834,8 @@ function get_all_supercache_filenames( $dir = '' ) {
 }
 
 function supercache_filename() {
+	global $cached_direct_pages;
+
 	//Add support for https and http caching
 	$is_https = ( ( isset( $_SERVER[ 'HTTPS' ] ) && 'on' ==  strtolower( $_SERVER[ 'HTTPS' ] ) ) || ( isset( $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] ) && 'https' == strtolower( $_SERVER[ 'HTTP_X_FORWARDED_PROTO' ] ) ) ); //Also supports https requests coming from an nginx reverse proxy
 	$extra_str = $is_https ? '-https' : '';
@@ -659,6 +845,10 @@ function supercache_filename() {
 	} else {
 		$extra_str = do_cacheaction( 'supercache_filename_str', $extra_str );
 	}
+
+	if ( is_array( $cached_direct_pages ) && in_array( $_SERVER[ 'REQUEST_URI' ], $cached_direct_pages ) ) {
+		$extra_str = '';
+	}
 	$filename = 'index' . $extra_str . '.html';
 
 	return $filename;
@@ -699,6 +889,9 @@ function wp_supercache_cache_for_admins() {
 	if ( false == do_cacheaction( 'wp_supercache_remove_cookies', true ) )
 		return true;
 
+	if ( $_SERVER[ "REQUEST_METHOD" ] != 'GET' || strpos( $_SERVER[ 'REQUEST_URI' ], '/wp-json/' ) !== false )
+		return true;
+
 	$cookie_keys = array( 'wordpress_logged_in', 'comment_author_' );
 	if ( defined( 'LOGGED_IN_COOKIE' ) )
 		$cookie_keys[] = constant( 'LOGGED_IN_COOKIE' );
@@ -718,12 +911,30 @@ function wp_supercache_cache_for_admins() {
 function wp_cache_confirm_delete( $dir ) {
 	global $cache_path, $blog_cache_dir;
 	// don't allow cache_path, blog cache dir, blog meta dir, supercache.
-	$dir = realpath( $dir );
-	if ( 
-		$dir == $cache_path || 
-		$dir == $blog_cache_dir ||
-		$dir == $blog_cache_dir . "meta/" ||
-		$dir == $cache_path . "supercache"
+	$dir = wpsc_get_realpath( $dir );
+
+	if ( ! $dir ) {
+		wp_cache_debug( "wp_cache_confirm_delete: directory does not exist" );
+		return false;
+	}
+
+	if ( ! wpsc_is_in_cache_directory( $dir ) ) {
+		return false;
+	}
+
+	$rp_cache_path = wpsc_get_realpath( $cache_path );
+
+	if ( ! $rp_cache_path ) {
+		wp_cache_debug( "wp_cache_confirm_delete: cache_path does not exist: $cache_path" );
+		return false;
+	}
+
+	if (
+		$dir == '' ||
+		$dir == $rp_cache_path ||
+		$dir == wpsc_get_realpath( $blog_cache_dir ) ||
+		$dir == wpsc_get_realpath( $blog_cache_dir . "meta/" ) ||
+		$dir == wpsc_get_realpath( $cache_path . "supercache" )
 	) {
 		return false;
 	} else {
@@ -743,4 +954,18 @@ function wpsc_deep_replace( $search, $subject ) {
 	return $subject;
 }
 
+function wpsc_get_protected_directories() {
+	global $cache_path, $blog_cache_dir;
+	return apply_filters( 'wpsc_protected_directories', array(
+									$cache_path . '.htaccess',
+									$cache_path . "index.html",
+									$blog_cache_dir,
+									$blog_cache_dir . "index.html",
+									$blog_cache_dir . 'meta',
+									$blog_cache_dir . 'meta/index.html',
+									$cache_path . 'supercache/index.html',
+									$cache_path . 'supercache' )
+								);
+}
+
 ?>
diff --git a/wp-content/plugins/wp-super-cache/wp-cache-phase2.php b/wp-content/plugins/wp-super-cache/wp-cache-phase2.php
index 774751dbe060330742c602cb20648acc47e5737f..e3fc54e4a39a0bafd43a0ad915ee45f3e910005a 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-phase2.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-phase2.php
@@ -1,9 +1,7 @@
 <?php
 
 function wp_cache_phase2() {
-	global $cache_filename, $cache_acceptable_files, $wp_cache_gzip_encoding, $super_cache_enabled, $cache_rebuild_files, $wp_cache_last_gc;
-	global $cache_max_time, $wp_cache_request_uri, $super_cache_enabled, $wp_cache_object_cache, $cache_time_interval;
-	global $cache_enabled, $wp_cache_gmt_offset, $wp_cache_blog_charset, $cache_schedule_type, $cache_scheduled_time, $cache_schedule_interval;
+	global $wp_cache_gzip_encoding, $super_cache_enabled, $cache_rebuild_files, $cache_enabled, $wp_cache_gmt_offset, $wp_cache_blog_charset;
 
 	if ( $cache_enabled == false ) {
 		wp_cache_debug( "Caching disabled! quiting!", 1 );
@@ -64,7 +62,7 @@ function wp_cache_phase2() {
 	wp_cache_debug( 'Created output buffer', 4 );
 
 	// restore old supercache file temporarily
-	if( $super_cache_enabled && $cache_rebuild_files ) {
+	if ( ( $_SERVER["REQUEST_METHOD"] != 'POST' && empty( $_POST ) ) && $super_cache_enabled && $cache_rebuild_files ) {
 		$user_info = wp_cache_get_cookies_values();
 		$do_cache = apply_filters( 'do_createsupercache', $user_info );
 		if( $user_info == '' || $do_cache === true )
@@ -75,25 +73,92 @@ function wp_cache_phase2() {
 }
 
 function wpcache_do_rebuild( $dir ) {
-	global $do_rebuild_list;
-	$dir = trailingslashit( $dir );
-	if ( isset( $do_rebuild_list[ $dir ] ) )
+	global $do_rebuild_list, $cache_path, $wpsc_file_mtimes;
+	wp_cache_debug( "wpcache_do_rebuild: doing rebuild for $dir" );
+
+	if ( !is_dir( $dir ) ) {
+		wp_cache_debug( "wpcache_do_rebuild: exiting as directory is not a directory: $dir" );
+		return false;
+	}
+
+	$dir = wpsc_get_realpath( $dir );
+	if ( ! $dir ) {
+		wp_cache_debug( "wpcache_do_rebuild: exiting as directory does not exist." );
+		return false;
+	}
+
+	if ( isset( $do_rebuild_list[ $dir ] ) ) {
+		wp_cache_debug( "wpcache_do_rebuild: directory already rebuilt: $dir" );
+		return false;
+	}
+
+	$protected = wpsc_get_protected_directories();
+	foreach( $protected as $id => $directory ) {
+		$protected[ $id ] = wpsc_get_realpath( $directory );
+	}
+
+	if ( ! wpsc_is_in_cache_directory( $dir ) ) {
+		wp_cache_debug( "wpcache_do_rebuild: exiting as directory not in cache_path: $dir" );
+		return false;
+	}
+
+	if ( in_array( $dir, $protected ) ) {
+		wp_cache_debug( "wpcache_do_rebuild: exiting as directory is protected: $dir" );
 		return false;
-	$do_rebuild_list[ $dir ] = 1;
-	$files_to_check = get_all_supercache_filenames( $dir );
-	foreach( $files_to_check as $cache_file ) {
-		$cache_file = $dir . $cache_file;
-		if( !@file_exists( $cache_file . '.needs-rebuild' ) )
+	}
+
+	if ( !is_dir( $dir ) ) {
+		wp_cache_debug( "wpcache_do_rebuild: exiting as directory is not a directory: $dir" );
+		return false;
+	}
+
+	$dh = @opendir( $dir );
+	if ( false == $dh ) {
+		wp_cache_debug( "wpcache_do_rebuild: exiting as could not open directory for reading: $dir" );
+		return false;
+	}
+
+	$dir = trailingslashit( $dir );
+	$wpsc_file_mtimes = array();
+	while ( ( $file = readdir( $dh ) ) !== false ) {
+		if ( $file == '.' || $file == '..' || false == is_file( $dir . $file ) ) {
+			continue;
+		}
+
+		$cache_file = $dir . $file;
+		// if the file is index.html.needs-rebuild and index.html doesn't exist and
+		// if the rebuild file is less than 10 seconds old then remove the ".needs-rebuild"
+		// extension so index.html can be served to other visitors temporarily
+		// until index.html is generated again at the end of this page.
+
+		if ( substr( $cache_file, -14 ) != '.needs-rebuild' ) {
+			wp_cache_debug( "wpcache_do_rebuild: base file found: $cache_file" );
 			continue;
-		$mtime = @filemtime($cache_file . '.needs-rebuild');
-		if( $mtime && (time() - $mtime) < 10 ) {
-			wp_cache_debug( "Rebuild file renamed to cache file temporarily: $cache_file", 3 );
-			@rename( $cache_file . '.needs-rebuild', $cache_file );
 		}
-		// cleanup old files or if rename fails
-		if( @file_exists( $cache_file . '.needs-rebuild' ) ) {
-			wp_cache_debug( "Rebuild file deleted: {$cache_file}.needs-rebuild", 3 );
-			@unlink( $cache_file . '.needs-rebuild' );
+
+		wp_cache_debug( "wpcache_do_rebuild: found rebuild file: $cache_file" );
+
+		if ( @file_exists( substr( $cache_file, 0, -14 ) ) ) {
+			wp_cache_debug( "wpcache_do_rebuild: rebuild file deleted because base file found: $cache_file" );
+			@unlink( $cache_file ); // delete the rebuild file because index.html already exists
+			continue;
+		}
+
+		$mtime = @filemtime( $cache_file );
+		if ( $mtime && ( time() - $mtime ) < 10 ) {
+			wp_cache_debug( "wpcache_do_rebuild: rebuild file is new: $cache_file" );
+			$base_file = substr( $cache_file, 0, -14 );
+			if ( false == @rename( $cache_file, $base_file ) ) { // rename the rebuild file
+				@unlink( $cache_file );
+				wp_cache_debug( "wpcache_do_rebuild: rebuild file rename failed. Deleted rebuild file: $cache_file" );
+			} else {
+				$do_rebuild_list[ $dir ] = 1;
+				$wpsc_file_mtimes[ $base_file ] = $mtime;
+				wp_cache_debug( "wpcache_do_rebuild: rebuild file renamed: $base_file" );
+			}
+		} else {
+			wp_cache_debug( "wpcache_do_rebuild: rebuild file deleted because it's too old: $cache_file" );
+			@unlink( $cache_file ); // delete the rebuild file because index.html already exists
 		}
 	}
 }
@@ -120,23 +185,82 @@ if ( !function_exists( 'wp_cache_user_agent_is_rejected' ) ) {
 }
 
 function wp_cache_get_response_headers() {
-	if(function_exists('apache_response_headers')) {
+	static $known_headers = array(
+						'Access-Control-Allow-Origin',
+						'Accept-Ranges',
+						'Age',
+						'Allow',
+						'Cache-Control',
+						'Connection',
+						'Content-Encoding',
+						'Content-Language',
+						'Content-Length',
+						'Content-Location',
+						'Content-MD5',
+						'Content-Disposition',
+						'Content-Range',
+						'Content-Type',
+						'Date',
+						'ETag',
+						'Expires',
+						'Last-Modified',
+						'Link',
+						'Location',
+						'P3P',
+						'Pragma',
+						'Proxy-Authenticate',
+						"Referrer-Policy",
+						'Refresh',
+						'Retry-After',
+						'Server',
+						'Status',
+						'Strict-Transport-Security',
+						'Trailer',
+						'Transfer-Encoding',
+						'Upgrade',
+						'Vary',
+						'Via',
+						'Warning',
+						'WWW-Authenticate',
+						'X-Frame-Options',
+						'Public-Key-Pins',
+						'X-XSS-Protection',
+						'Content-Security-Policy',
+						"X-Pingback",
+						'X-Content-Security-Policy',
+						'X-WebKit-CSP',
+						'X-Content-Type-Options',
+						'X-Powered-By',
+						'X-UA-Compatible',
+						'X-Robots-Tag',
+					);
+
+	$known_headers = apply_filters( 'wpsc_known_headers', $known_headers );
+
+	if ( ! isset( $known_headers[ 'age' ] ) ) {
+		$known_headers = array_map( 'strtolower', $known_headers );
+	}
+
+	$headers = array();
+	if ( function_exists( 'apache_response_headers' ) ) {
 		$headers = apache_response_headers();
-		if ( empty( $headers ) ) {
-			flush();
-			$headers = apache_response_headers();
-		}
-	} else if(function_exists('headers_list')) {
+	}
+	if ( empty( $headers ) && function_exists( 'headers_list' ) ) {
 		$headers = array();
-		foreach(headers_list() as $hdr) {
+		foreach( headers_list() as $hdr ) {
 			$header_parts = explode( ':', $hdr, 2 );
 			$header_name  = isset( $header_parts[0] ) ? trim( $header_parts[0] ) : '';
 			$header_value = isset( $header_parts[1] ) ? trim( $header_parts[1] ) : '';
 
 			$headers[$header_name] = $header_value;
 		}
-	} else
-		$headers = null;
+	}
+
+	foreach( $headers as $key => $value ) {
+		if ( ! in_array( strtolower( $key ), $known_headers ) ) {
+			unset( $headers[ $key ] );
+		}
+	}
 
 	return $headers;
 }
@@ -246,19 +370,29 @@ function wp_super_cache_query_vars() {
 		$wp_super_cache_query[ 'is_home' ] = 1;
 	if ( is_author() )
 		$wp_super_cache_query[ 'is_author' ] = 1;
-	if ( is_feed() )
+	if ( is_feed() || get_query_var( 'sitemap' ) || get_query_var( 'xsl' ) || get_query_var( 'xml_sitemap' ) )
 		$wp_super_cache_query[ 'is_feed' ] = 1;
+
+	return $wp_super_cache_query;
 }
 
 function wp_cache_ob_callback( $buffer ) {
-	global $wp_cache_pages, $wp_query, $wp_super_cache_query, $cache_acceptable_files, $wp_cache_no_cache_for_get, $wp_cache_object_cache, $wp_cache_request_uri, $do_rebuild_list;
+	global $wp_cache_pages, $wp_query, $wp_super_cache_query, $cache_acceptable_files, $wp_cache_no_cache_for_get, $wp_cache_object_cache, $wp_cache_request_uri, $do_rebuild_list, $wpsc_file_mtimes, $wpsc_save_headers, $super_cache_enabled;
 	$buffer = apply_filters( 'wp_cache_ob_callback_filter', $buffer );
 
 	$script = basename($_SERVER['PHP_SELF']);
 
 	// All the things that can stop a page being cached
 	$cache_this_page = true;
-	if ( defined( 'DONOTCACHEPAGE' ) ) {
+
+	if ( empty( $wp_super_cache_query ) ) {
+		$wp_super_cache_query = wp_super_cache_query_vars();
+	}
+
+	if ( empty( $wp_super_cache_query ) ) {
+		$cache_this_page = false;
+		wp_cache_debug( 'wp_cache_ob_callback: wp_super_cache_query is empty. Not caching unknown page type.' );
+	} elseif ( defined( 'DONOTCACHEPAGE' ) ) {
 		wp_cache_debug( 'DONOTCACHEPAGE defined. Caching disabled.', 2 );
 		$cache_this_page = false;
 	} elseif ( $wp_cache_no_cache_for_get && false == empty( $_GET ) && false == defined( 'DOING_CRON' ) ) {
@@ -317,6 +451,9 @@ function wp_cache_ob_callback( $buffer ) {
 		$cache_this_page = false;
 	}
 
+	if ( isset( $wpsc_save_headers ) && $wpsc_save_headers )
+		$super_cache_enabled = false; // use standard caching to record headers
+
 	if ( !isset( $wp_query ) )
 		wp_cache_debug( 'wp_cache_ob_callback: WARNING! $query not defined but the plugin has worked around that problem.', 4 );
 
@@ -326,17 +463,24 @@ function wp_cache_ob_callback( $buffer ) {
 
 		$buffer = wp_cache_get_ob( $buffer );
 		wp_cache_shutdown_callback();
+
+		if ( isset( $wpsc_file_mtimes ) && is_array( $wpsc_file_mtimes ) && !empty( $wpsc_file_mtimes ) ) {
+			foreach( $wpsc_file_mtimes as $cache_file => $old_mtime ) {
+				if ( $old_mtime == @filemtime( $cache_file ) ) {
+					wp_cache_debug( "wp_cache_ob_callback deleting unmodified rebuilt cache file: $cache_file" );
+					if ( wp_cache_confirm_delete( $cache_file ) ) {
+						@unlink( $cache_file );
+					}
+				}
+			}
+		}
 		return $buffer;
 	} else {
 		if ( is_array( $do_rebuild_list ) && false == empty( $do_rebuild_list ) ) {
 			foreach( $do_rebuild_list as $dir => $n ) {
 				if ( wp_cache_confirm_delete( $dir ) ) {
 					wp_cache_debug( 'wp_cache_ob_callback clearing rebuilt files in ' . $dir );
-					$files_to_check = get_all_supercache_filenames( $dir );
-					foreach( $files_to_check as $cache_file ) {
-						$cache_file = $dir . $cache_file;
-						@unlink( $cache_file );
-					}
+					wpsc_delete_files( $dir );
 				}
 			}
 		}
@@ -356,10 +500,17 @@ function wp_cache_append_tag( &$buffer ) {
 
 	$timestamp = gmdate('Y-m-d H:i:s', (time() + ( $wp_cache_gmt_offset * 3600)));
 	if ( $cache_enabled || $super_cache_enabled ) {
-		$buffer .= "\n<!-- Cached page generated by WP-Super-Cache on $timestamp -->\n";
+		$msg = "\n<!-- Cached page generated by WP-Super-Cache on $timestamp -->\n";
 	} else {
-		$buffer .= "\n<!-- Live page served on $timestamp -->\n";
+		$msg = "\n<!-- Live page served on $timestamp -->\n";
+	}
+
+	if ( strpos( $buffer, '<html' ) === false ) {
+		wp_cache_debug( site_url( $_SERVER[ 'REQUEST_URI' ] ) . " - " . $msg );
+		return false;
 	}
+
+	$buffer .= $msg;
 }
 
 function wp_cache_add_to_buffer( &$buffer, $text ) {
@@ -371,6 +522,11 @@ function wp_cache_add_to_buffer( &$buffer, $text ) {
 	if ( $wp_super_cache_comments == 0 )
 		return false;
 
+	if ( strpos( $buffer, '<html' ) === false ) {
+		wp_cache_debug( site_url( $_SERVER[ 'REQUEST_URI' ] ) . " - " . $text );
+		return false;
+	}
+
 	$buffer .= "\n<!-- $text -->";
 }
 
@@ -390,11 +546,11 @@ function wp_cache_maybe_dynamic( &$buffer ) {
 }
 
 function wp_cache_get_ob(&$buffer) {
-	global $cache_enabled, $cache_path, $cache_filename, $meta_file, $wp_start_time, $supercachedir;
-	global $new_cache, $wp_cache_meta, $file_expired, $blog_id, $cache_compression;
-	global $wp_cache_gzip_encoding, $super_cache_enabled, $cached_direct_pages;
+	global $cache_enabled, $cache_path, $cache_filename, $wp_start_time, $supercachedir;
+	global $new_cache, $wp_cache_meta, $cache_compression, $wp_super_cache_query;
+	global $wp_cache_gzip_encoding, $super_cache_enabled;
 	global $wp_cache_404, $gzsize, $supercacheonly;
-	global $blog_cache_dir, $wp_cache_request_uri, $wp_supercache_cache_list;
+	global $blog_cache_dir, $wp_supercache_cache_list;
 	global $wp_cache_not_logged_in, $wp_cache_object_cache, $cache_max_time;
 	global $wp_cache_is_home, $wp_cache_front_page_checks, $wp_cache_mfunc_enabled;
 
@@ -447,8 +603,8 @@ function wp_cache_get_ob(&$buffer) {
 		return wp_cache_maybe_dynamic( $buffer );
 	}
 
-	if ( $wp_cache_not_logged_in && is_feed() ) {
-		wp_cache_debug( "Feed detected. Writing legacy cache files.", 5 );
+	if ( $wp_cache_not_logged_in && isset( $wp_super_cache_query[ 'is_feed' ] ) ) {
+		wp_cache_debug( "Feed detected. Writing wpcache cache files.", 5 );
 		$wp_cache_not_logged_in = false;
 	}
 
@@ -456,7 +612,7 @@ function wp_cache_get_ob(&$buffer) {
 
 	$dir = get_current_url_supercache_dir();
 	$supercachedir = $cache_path . 'supercache/' . preg_replace('/:.*$/', '',  $home_url[ 'host' ]);
-	if( !empty( $_GET ) || is_feed() || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) {
+	if ( ! empty( $_GET ) || isset( $wp_super_cache_query[ 'is_feed' ] ) || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) {
 		wp_cache_debug( "Supercache disabled: GET or feed detected or disabled by config.", 2 );
 		$super_cache_enabled = false;
 	}
@@ -504,6 +660,19 @@ function wp_cache_get_ob(&$buffer) {
 
 	if( @is_dir( $dir ) == false )
 		@wp_mkdir_p( $dir );
+	$dir = wpsc_get_realpath( $dir );
+
+	if ( ! $dir ) {
+		wp_cache_debug( "wp_cache_get_ob: not caching as directory does not exist." );
+		return $buffer;
+	}
+
+	$dir = trailingslashit( $dir );
+
+	if ( ! wpsc_is_in_cache_directory( $dir ) ) {
+		wp_cache_debug( "wp_cache_get_ob: not caching as directory is not in cache_path: $dir" );
+		return $buffer;
+	}
 
 	$fr = $fr2 = $gz = false;
 	// Open wp-cache cache file
@@ -567,9 +736,9 @@ function wp_cache_get_ob(&$buffer) {
 		if ( false == isset( $wp_super_cache_late_init ) || ( isset( $wp_super_cache_late_init ) && $wp_super_cache_late_init == 0 ) )
 			wp_cache_add_to_buffer( $buffer, 'Super Cache dynamic page detected but late init not set. See the readme.txt for further details.' );
 
-		if ( $fr ) { // legacy caching
-			wp_cache_debug( "Writing dynamic buffer to legacy file." );
-			wp_cache_add_to_buffer( $buffer, "Dynamic Legacy Super Cache" );
+		if ( $fr ) { // wpcache caching
+			wp_cache_debug( "Writing dynamic buffer to wpcache file." );
+			wp_cache_add_to_buffer( $buffer, "Dynamic WPCache Super Cache" );
 			fputs( $fr, '<?php die(); ?>' . $buffer );
 		} elseif ( isset( $fr2 ) ) { // supercache active
 			wp_cache_debug( "Writing dynamic buffer to supercache file." );
@@ -632,16 +801,16 @@ function wp_cache_get_ob(&$buffer) {
 			$supercacheonly = false;
 			fclose($fr);
 			if ( filesize( $tmp_wpcache_filename ) == 0 ) {
-				wp_cache_debug( "Warning! The file $tmp_wpcache_filename was empty. Did not rename to {$blog_cache_dir}{$cache_filename}", 5 );
+				wp_cache_debug( "Warning! The file $tmp_wpcache_filename was empty. Did not rename to {$dir}/{$cache_filename}", 5 );
 				@unlink( $tmp_wpcache_filename );
 			} else {
-				if ( !@rename( $tmp_wpcache_filename, $blog_cache_dir . $cache_filename ) ) {
-					if ( false == is_dir( $blog_cache_dir ) )
-						@wp_mkdir_p( $blog_cache_dir );
-					@unlink( $blog_cache_dir . $cache_filename );
-					@rename( $tmp_wpcache_filename, $blog_cache_dir . $cache_filename );
+				if ( !@rename( $tmp_wpcache_filename, $dir . '/' . $cache_filename ) ) {
+					if ( false == is_dir( $dir ) )
+						@wp_mkdir_p( $dir );
+					@unlink( $dir . $cache_filename );
+					@rename( $tmp_wpcache_filename, $dir . '/' . $cache_filename );
 				}
-				wp_cache_debug( "Renamed temp wp-cache file to {$blog_cache_dir}$cache_filename", 5 );
+				wp_cache_debug( "Renamed temp wp-cache file to {$dir}/$cache_filename", 5 );
 				$added_cache = 1;
 			}
 		}
@@ -700,7 +869,7 @@ function wp_cache_get_ob(&$buffer) {
 }
 
 function wp_cache_phase2_clean_cache($file_prefix) {
-	global $cache_path, $blog_cache_dir;
+	global $wpdb, $blog_cache_dir;
 
 	if( !wp_cache_writers_entry() )
 		return false;
@@ -709,8 +878,8 @@ function wp_cache_phase2_clean_cache($file_prefix) {
 		while ( false !== ($file = @readdir($handle))) {
 			if ( strpos( $file, $file_prefix ) !== false ) {
 				if ( strpos( $file, '.html' ) ) {
-					// delete old legacy files immediately
-					wp_cache_debug( "wp_cache_phase2_clean_cache: Deleting obsolete legacy cache+meta files: $file" );
+					// delete old wpcache files immediately
+					wp_cache_debug( "wp_cache_phase2_clean_cache: Deleting obsolete wpcache cache+meta files: $file" );
 					@unlink( $blog_cache_dir . $file);
 					@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
 				} else {
@@ -728,8 +897,27 @@ function wp_cache_phase2_clean_cache($file_prefix) {
 }
 
 function prune_super_cache( $directory, $force = false, $rename = false ) {
-	global $cache_max_time, $cache_path, $cache_rebuild_files, $blog_cache_dir;
+
+	// Don't prune a NULL/empty directory.
+	if ( null === $directory || '' === $directory ) {
+		wp_cache_debug( "prune_super_cache: directory is blank" );
+		return false;
+	}
+
+	global $cache_max_time, $cache_path, $blog_cache_dir;
 	static $log = 0;
+	static $protected_directories = '';
+
+	$dir = $directory;
+	$directory = wpsc_get_realpath( $directory );
+	if ( $directory == '' ) {
+		wp_cache_debug( "prune_super_cache: exiting as file/directory does not exist : $dir" );
+		return false;
+	}
+	if ( ! wpsc_is_in_cache_directory( $directory ) ) {
+		wp_cache_debug( "prune_super_cache: exiting as directory is not in cache path: *$directory* (was $dir before realpath)" );
+		return false;
+	}
 
 	if ( false == @file_exists( $directory ) ) {
 		wp_cache_debug( "prune_super_cache: exiting as file/dir does not exist: $directory" );
@@ -740,16 +928,10 @@ function prune_super_cache( $directory, $force = false, $rename = false ) {
 
 	$now = time();
 
-	$protected_directories = array( $cache_path . '.htaccess', 
-									$cache_path . "index.html", 
-									$cache_path . $blog_cache_dir, 
-									$cache_path . $blog_cache_dir . "index.html", 
-									$cache_path . $blog_cache_dir . 'meta', 
-									$cache_path . $blog_cache_dir . 'meta/index.html', 
-									$cache_path . 'supercache/index.html',
-									$cache_path . 'supercache' );
+	if ( $protected_directories == '' ) {
+		$protected_directories = wpsc_get_protected_directories();
+	}
 
-	$oktodelete = false;
 	if (is_dir($directory)) {
 		if( $dh = @opendir( $directory ) ) {
 			$directory = trailingslashit( $directory );
@@ -812,20 +994,64 @@ function prune_super_cache( $directory, $force = false, $rename = false ) {
 }
 
 function wp_cache_rebuild_or_delete( $file ) {
-	global $cache_rebuild_files;
-	if( strpos( $file, '?' ) !== false )
+	global $cache_rebuild_files, $cache_path, $file_prefix;
+
+
+	if ( strpos( $file, '?' ) !== false )
 		$file = substr( $file, 0, strpos( $file, '?' ) );
+
+	$file = wpsc_get_realpath( $file );
+
+	if ( ! $file ) {
+		wp_cache_debug( "wp_cache_rebuild_or_delete: file doesn't exist" );
+		return false;
+	}
+
+	if ( ! wpsc_is_in_cache_directory( $file ) ) {
+		wp_cache_debug( "rebuild_or_gc quitting because file is not in cache_path: $file" );
+		return false;
+	}
+
+	$protected = wpsc_get_protected_directories();
+	foreach( $protected as $id => $directory ) {
+		$protected[ $id ] = wpsc_get_realpath( $directory );
+	}
+
+	if ( in_array( $file, $protected ) ) {
+		wp_cache_debug( "rebuild_or_gc: file is protected: $file" );
+		return false;
+	}
+
+	if ( substr( basename( $file ), 0, mb_strlen( $file_prefix ) ) == $file_prefix ) {
+		@unlink( $file );
+		wp_cache_debug( "rebuild_or_gc: deleted non-anonymous file: $file" );
+		return false;
+	}
+
+	if ( substr( basename( $file ), 0, 5 + mb_strlen( $file_prefix ) ) == 'meta-' . $file_prefix ) {
+		@unlink( $file );
+		wp_cache_debug( "rebuild_or_gc: deleted meta file: $file" );
+		return false;
+	}
+
+	if ( false == @file_exists( $file ) ) {
+		wp_cache_debug( "rebuild_or_gc: file has disappeared: $file" );
+		return false;
+	}
 	if( $cache_rebuild_files && substr( $file, -14 ) != '.needs-rebuild' ) {
 		if( @rename($file, $file . '.needs-rebuild') ) {
 			@touch( $file . '.needs-rebuild' );
 			wp_cache_debug( "rebuild_or_gc: rename file to {$file}.needs-rebuild", 2 );
 		} else {
 			@unlink( $file );
-			wp_cache_debug( "rebuild_or_gc: deleted $file", 2 );
+			wp_cache_debug( "rebuild_or_gc: rename failed. deleted $file", 2 );
 		}
 	} else {
-		@unlink( $file );
-		wp_cache_debug( "rebuild_or_gc: deleted $file", 2 );
+		$mtime = @filemtime( $file );
+		if ( $mtime && ( time() - $mtime ) > 10 ) {
+			@unlink( $file );
+			wp_cache_debug( "rebuild_or_gc: rebuild file found. deleted because it was too old: $file", 2 );
+		}
 	}
 }
 
@@ -844,7 +1070,7 @@ function wp_cache_phase2_clean_expired( $file_prefix, $force = false ) {
 				(@filemtime( $blog_cache_dir . $file) + $cache_max_time) <= $now  ) {
 				@unlink( $blog_cache_dir . $file );
 				@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
-				wp_cache_debug( "wp_cache_phase2_clean_expired: Deleting obsolete legacy cache+meta files: $file" );
+				wp_cache_debug( "wp_cache_phase2_clean_expired: Deleting obsolete wpcache cache+meta files: $file" );
 				continue;
 			}
 			if($file != '.' && $file != '..') {
@@ -868,9 +1094,14 @@ function wp_cache_phase2_clean_expired( $file_prefix, $force = false ) {
 }
 
 function wp_cache_shutdown_callback() {
-	global $cache_path, $cache_max_time, $file_expired, $file_prefix, $meta_file, $new_cache, $wp_cache_meta, $known_headers, $blog_id, $wp_cache_gzip_encoding, $gzsize, $cache_filename, $supercacheonly, $blog_cache_dir;
+	global $cache_max_time, $meta_file, $new_cache, $wp_cache_meta, $known_headers, $blog_id, $wp_cache_gzip_encoding, $supercacheonly, $blog_cache_dir;
 	global $wp_cache_request_uri, $wp_cache_key, $wp_cache_object_cache, $cache_enabled, $wp_cache_blog_charset, $wp_cache_not_logged_in;
-	global $WPSC_HTTP_HOST;
+	global $WPSC_HTTP_HOST, $wp_super_cache_query;
+
+	if ( false == $new_cache ) {
+		wp_cache_debug( "wp_cache_shutdown_callback: No cache file created. Returning." );
+		return false;
+	}
 
 	$wp_cache_meta[ 'uri' ] = $WPSC_HTTP_HOST . preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $wp_cache_request_uri); // To avoid XSS attacks
 	$wp_cache_meta[ 'blog_id' ] = $blog_id;
@@ -879,10 +1110,8 @@ function wp_cache_shutdown_callback() {
 	$wp_cache_meta = apply_filters( 'wp_cache_meta', $wp_cache_meta );
 
 	$response = wp_cache_get_response_headers();
-	foreach ($known_headers as $key) {
-		if(isset($response[$key])) {
-			$wp_cache_meta[ 'headers' ][ $key ] = "$key: " . $response[$key];
-		}
+	foreach( $response as $key => $value ) {
+		$wp_cache_meta[ 'headers' ][ $key ] = "$key: $value";
 	}
 
 	wp_cache_debug( "wp_cache_shutdown_callback: collecting meta data.", 2 );
@@ -898,7 +1127,7 @@ function wp_cache_shutdown_callback() {
 		// the output buffer. This is a last ditch effort to set the
 		// correct Content-Type header for feeds, if we didn't see
 		// it in the response headers already. -- dougal
-		if (is_feed()) {
+		if ( isset( $wp_super_cache_query[ 'is_feed' ] ) ) {
 			$type = get_query_var('feed');
 			$type = str_replace('/','',$type);
 			switch ($type) {
@@ -908,11 +1137,23 @@ function wp_cache_shutdown_callback() {
 				case 'rdf':
 					$value = "application/rdf+xml";
 					break;
+				case 'sitemap':
+					$value = "text/xml";
+					break;
 				case 'rss':
 				case 'rss2':
 				default:
-					$value = "application/rss+xml";
+					if ( get_query_var( 'sitemap' ) || get_query_var( 'xsl' ) || get_query_var( 'xml_sitemap' ) ) {
+						wp_cache_debug( "wp_cache_shutdown_callback: feed sitemap detected: text/xml" );
+						$value = "text/xml";
+					} else {
+						$value = "application/rss+xml";
+					}
 			}
+			wp_cache_debug( "wp_cache_shutdown_callback: feed is type: $type - $value" );
+		} elseif ( get_query_var( 'sitemap' ) || get_query_var( 'xsl' ) || get_query_var( 'xml_sitemap' ) ) {
+			wp_cache_debug( "wp_cache_shutdown_callback: sitemap detected: text/xml" );
+			$value = "text/xml";
 		} else { // not a feed
 			$value = get_option( 'html_type' );
 			if( $value == '' )
@@ -933,24 +1174,26 @@ function wp_cache_shutdown_callback() {
 		}
 
 		$serial = '<?php die(); ?>' . json_encode( $wp_cache_meta );
+		$dir = get_current_url_supercache_dir();
+		if( @is_dir( $dir ) == false )
+			@wp_mkdir_p( $dir );
+
 		if( wp_cache_writers_entry() ) {
-			wp_cache_debug( "Writing meta file: {$blog_cache_dir}meta/{$meta_file}", 2 );
+			wp_cache_debug( "Writing meta file: {$dir}meta-{$meta_file}", 2 );
 			if ( false == $wp_cache_object_cache ) {
-				$tmp_meta_filename = $blog_cache_dir . 'meta/' . uniqid( mt_rand(), true ) . '.tmp';
-				$fr = @fopen( $tmp_meta_filename, 'w');
-				if( !$fr )
-					@wp_mkdir_p( $blog_cache_dir . 'meta' );
+				$tmp_meta_filename = $dir . uniqid( mt_rand(), true ) . '.tmp';
+				$final_meta_filename = $dir . "meta-" . $meta_file;
 				$fr = @fopen( $tmp_meta_filename, 'w');
 				if ( $fr ) {
 					fputs($fr, $serial);
 					fclose($fr);
 					@chmod( $tmp_meta_filename, 0666 & ~umask());
-					if( !@rename( $tmp_meta_filename, $blog_cache_dir . 'meta/' . $meta_file ) ) {
-						@unlink( $blog_cache_dir . 'meta/' . $meta_file );
-						@rename( $tmp_meta_filename, $blog_cache_dir . 'meta/' . $meta_file );
+					if( !@rename( $tmp_meta_filename, $final_meta_filename ) ) {
+						@unlink( $dir . $final_meta_filename );
+						@rename( $tmp_meta_filename, $final_meta_filename );
 					}
 				} else {
-					wp_cache_debug( "Problem writing meta file: {$blog_cache_dir}meta/{$meta_file}", 2 );
+					wp_cache_debug( "Problem writing meta file: {$final_meta_filename}" );
 				}
 			} elseif ( $cache_enabled ) {
 				$oc_key = get_oc_key() . ".meta";
@@ -961,7 +1204,7 @@ function wp_cache_shutdown_callback() {
 			wp_cache_writers_exit();
 		}
 	} else {
-		wp_cache_debug( "Did not write meta file: $meta_file *$supercacheonly* *$wp_cache_not_logged_in* *$new_cache*", 2 );
+		wp_cache_debug( "Did not write meta file: meta-{$meta_file} *$supercacheonly* *$wp_cache_not_logged_in* *$new_cache*", 2 );
 	}
 	global $time_to_gc_cache;
 	if( isset( $time_to_gc_cache ) && $time_to_gc_cache == 1 ) {
@@ -1001,7 +1244,7 @@ function wp_cache_get_postid_from_comment( $comment_id, $status = 'NA' ) {
 			define( 'DONOTDELETECACHE', 1 );
 			return $postid;
 		} elseif( $comment['comment_approved'] == '0' ) {
-			if ( $comment[ 'content_type' ] == '' ) {
+			if ( $comment[ 'comment_type' ] == '' ) {
 				wp_cache_debug( "Moderated comment. Don't delete supercache file until comment approved.", 4 );
 				$super_cache_enabled = 0; // don't remove the super cache static file until comment is approved
 				define( 'DONOTDELETECACHE', 1 );
@@ -1102,7 +1345,7 @@ function wp_cache_post_edit($post_id) {
 
 	// Some users are inexplicibly seeing this error on scheduled posts. 
 	// define this constant to disable the post status check.
-	if ( false == defined( 'WPSCFORCEUPDATE' ) && $post->post_status != 'publish' ) {
+	if ( false == defined( 'WPSCFORCEUPDATE' ) && !in_array($post->post_status, array( 'publish', 'private' ) ) ) {
 		wp_cache_debug( "wp_cache_post_edit: draft post, not deleting any cache files. status: " . $post->post_status, 4 );
 		return $post_id;
 	}
@@ -1123,8 +1366,8 @@ function wp_cache_post_edit($post_id) {
 	}
 }
 
-function wp_cache_post_id_gc( $siteurl, $post_id, $all = 'all' ) {
-	global $cache_path, $wp_cache_object_cache, $wp_cache_refresh_single_only;
+function wp_cache_post_id_gc( $post_id, $all = 'all' ) {
+	global $wp_cache_object_cache;
 	
 	if ( $wp_cache_object_cache )
 		reset_oc_version();
@@ -1140,8 +1383,8 @@ function wp_cache_post_id_gc( $siteurl, $post_id, $all = 'all' ) {
 		prune_super_cache( $dir, true, true );
 		do_action( 'gc_cache', 'prune', $permalink );
 		@rmdir( $dir );
-		wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$supercache_home}page/." );
 		$supercache_home = get_supercache_dir();
+		wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$supercache_home}page/." );
 		prune_super_cache( $supercache_home . 'page/', true );
 		do_action( 'gc_cache', 'prune', 'page/' );
 	} else {
@@ -1152,7 +1395,7 @@ function wp_cache_post_id_gc( $siteurl, $post_id, $all = 'all' ) {
 }
 
 function wp_cache_post_change( $post_id ) {
-	global $file_prefix, $cache_path, $blog_id, $super_cache_enabled, $blog_cache_dir, $blogcacheid, $wp_cache_refresh_single_only, $wp_cache_object_cache;
+	global $file_prefix, $cache_path, $blog_id, $super_cache_enabled, $blog_cache_dir, $wp_cache_refresh_single_only, $wp_cache_object_cache;
 	static $last_processed = -1;
 
 	if ( $post_id == $last_processed ) {
@@ -1162,7 +1405,7 @@ function wp_cache_post_change( $post_id ) {
 	$post = get_post( $post_id );
 	// Some users are inexplicibly seeing this error on scheduled posts. 
 	// define this constant to disable the post status check.
-	if ( false == defined( 'WPSCFORCEUPDATE' ) && is_object( $post ) && $post->post_status != 'publish' ) {
+	if ( false == defined( 'WPSCFORCEUPDATE' ) && is_object( $post ) && !in_array($post->post_status, array( 'publish', 'private' ) ) ) {
 		wp_cache_debug( "wp_cache_post_change: draft post, not deleting any cache files.", 4 );
 		return $post_id;
 	}
@@ -1191,20 +1434,13 @@ function wp_cache_post_change( $post_id ) {
 	if ( $wp_cache_object_cache )
 		reset_oc_version();
 
-	$permalink = trailingslashit( str_replace( get_option( 'siteurl' ), '', get_permalink( $post_id ) ) );
-
 	// Delete supercache files whenever a post change event occurs, even if supercache is currently disabled.
 	$dir = get_supercache_dir();
-	$siteurl = trailingslashit( strtolower( preg_replace( '/:.*$/', '', str_replace( 'https://', '', str_replace( 'http://', '', get_option( 'home' ) ) ) ) ) );
 	// make sure the front page has a rebuild file
-	wp_cache_post_id_gc( $siteurl, $post_id, $all );
+	wp_cache_post_id_gc( $post_id, $all );
 	if ( $all == true ) {
-		wp_cache_debug( "Post change: supercache enabled: deleting cache files in " . $cache_path . 'supercache/' . $siteurl, 4 );
-		$files_to_check = get_all_supercache_filenames( $dir );
-		foreach( $files_to_check as $cache_file ) {
-			wp_cache_debug( "Post change: deleting cache file: " . $dir . $cache_file, 4 );
-			prune_super_cache( $dir . $cache_file, true, true ); 
-		}
+		wp_cache_debug( "Post change: supercache enabled: deleting cache files in " . $dir );
+		wpsc_rebuild_files( $dir );
 		do_action( 'gc_cache', 'prune', 'homepage' );
 	} else {
 		wp_cache_debug( "wp_cache_post_change: not deleting all pages.", 4 );
@@ -1213,10 +1449,8 @@ function wp_cache_post_change( $post_id ) {
 		wp_cache_debug( "Post change: deleting page_on_front and page_for_posts pages.", 4 );
 		wp_cache_debug( "Post change: page_on_front " . get_option( 'page_on_front' ), 4 );
 		$permalink = trailingslashit( str_replace( get_option( 'home' ), '', get_permalink( get_option( 'page_for_posts' ) ) ) );
-		$files_to_check = get_all_supercache_filenames( $dir . $permalink );
-		foreach( $files_to_check as $cache_file ) {
-			prune_super_cache( $dir . $permalink . $cache_file, true, true ); 
-		}
+		wp_cache_debug( "Post change: Deleting files in: " . str_replace( '//', '/', $dir . $permalink ) );
+		wpsc_rebuild_files( $dir . $permalink );
 		do_action( 'gc_cache', 'prune', $permalink );
 	} else {
 		wp_cache_debug( "wp_cache_post_change: not deleting front static page.", 4 );
@@ -1228,8 +1462,8 @@ function wp_cache_post_change( $post_id ) {
 		while ( false !== ($file = readdir($handle))) {
 			if ( strpos( $file, $file_prefix ) !== false ) {
 				if ( strpos( $file, '.html' ) ) {
-					// delete old legacy files immediately
-					wp_cache_debug( "wp_cache_post_change: Deleting obsolete legacy cache+meta files: $file" );
+					// delete old wpcache files immediately
+					wp_cache_debug( "wp_cache_post_change: Deleting obsolete wpcache cache+meta files: $file" );
 					@unlink( $blog_cache_dir . $file);
 					@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
 					continue;
@@ -1248,11 +1482,8 @@ function wp_cache_post_change( $post_id ) {
 							@unlink( $blog_cache_dir . 'meta/' . $file );
 							@unlink( $blog_cache_dir . $file );
 							if ( false == $supercache_files_deleted && $super_cache_enabled == true ) {
-								$files_to_check = get_all_supercache_filenames( $dir . $permalink );
-								wp_cache_debug( "Post change: deleting supercache files for {$permalink}: $file " . print_r( $files_to_check, 1 ), 4 );
-								foreach( $files_to_check as $cache_file ) {
-									@wp_cache_rebuild_or_delete( $dir . trailingslashit( $permalink ) . $cache_file );
-								}
+								wp_cache_debug( "Post change: deleting supercache files for {$permalink}" );
+								wpsc_rebuild_files( $dir . $permalink );
 								$supercache_files_deleted = true;
 								do_action( 'gc_cache', 'rebuild', $permalink );
 							}
@@ -1262,11 +1493,8 @@ function wp_cache_post_change( $post_id ) {
 						@unlink( $blog_cache_dir . 'meta/' . $file );
 						@unlink( $blog_cache_dir . $file );
 						if ( $super_cache_enabled == true ) {
-							$files_to_check = get_all_supercache_filenames( $dir . $meta[ 'uri' ] );
-							wp_cache_debug( "Post change: deleting supercache files for {$meta[ 'uri' ]}: $file " . print_r( $files_to_check, 1 ), 4 );
-							foreach( $files_to_check as $cache_file ) {
-								@wp_cache_rebuild_or_delete( $dir . trailingslashit( $meta[ 'uri' ] ) . $cache_file );
-							}
+							wp_cache_debug( "Post change: deleting supercache files for {$meta[ 'uri' ]}" );
+							wpsc_rebuild_files( $dir . $meta[ 'uri' ] );
 							do_action( 'gc_cache', 'rebuild', trailingslashit( $meta[ 'uri' ] ) );
 						}
 					}
@@ -1282,7 +1510,7 @@ function wp_cache_post_change( $post_id ) {
 function wp_cache_microtime_diff($a, $b) {
 	list($a_dec, $a_sec) = explode(' ', $a);
 	list($b_dec, $b_sec) = explode(' ', $b);
-	return $b_sec - $a_sec + $b_dec - $a_dec;
+	return (float)$b_sec - (float)$a_sec + (float)$b_dec - (float)$a_dec;
 }
 
 function wp_cache_post_id() {
@@ -1414,4 +1642,9 @@ function wp_cache_gc_watcher() {
 	}
 }
 
+function wpsc_timestamp_cache_update( $type, $permalink ) {
+	wp_cache_setting( 'wpsc_last_post_update', time() );
+}
+add_action( 'gc_cache', 'wpsc_timestamp_cache_update', 10, 2 );
+
 ?>
diff --git a/wp-content/plugins/wp-super-cache/wp-cache.php b/wp-content/plugins/wp-super-cache/wp-cache.php
index 3fa89c9c9fdb79fc36cb2c66c3eb73628ea444d2..9f7ac154e67b9844776f150ebcf0bc561e9dba9d 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache.php
@@ -3,7 +3,7 @@
 Plugin Name: WP Super Cache
 Plugin URI: https://wordpress.org/plugins/wp-super-cache/
 Description: Very fast caching plugin for WordPress.
-Version: 1.4.9
+Version: 1.5.4
 Author: Automattic
 Author URI: https://automattic.com/
 License: GPL2+
@@ -28,26 +28,39 @@ Text Domain: wp-super-cache
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-// Pre-2.6 compatibility
-if( !defined('WP_CONTENT_URL') )
-	define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
-if( !defined('WP_CONTENT_DIR') )
-	define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
-
-$wp_cache_config_file = WP_CONTENT_DIR . '/wp-cache-config.php';
+function wpsc_init() {
+	global $wp_cache_config_file, $wp_cache_config_file_sample, $wp_cache_file, $wp_cache_check_wp_config, $wp_cache_link;
+	// Pre-2.6 compatibility
+	if ( !defined('WP_CONTENT_URL') )
+		define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content');
+	if ( !defined('WP_CONTENT_DIR') )
+		define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
+
+	$wp_cache_config_file = WP_CONTENT_DIR . '/wp-cache-config.php';
+
+	if ( !defined( 'WPCACHEHOME' ) ) {
+		define( 'WPCACHEHOME', dirname( __FILE__ ) . '/' );
+		$wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
+		$wp_cache_file = WPCACHEHOME . 'advanced-cache.php';
+	} elseif ( realpath( WPCACHEHOME ) != realpath( dirname( __FILE__ ) ) ) {
+		$wp_cache_config_file_sample = dirname( __FILE__ ) . '/wp-cache-config-sample.php';
+		$wp_cache_file = dirname( __FILE__ ) . '/advanced-cache.php';
+		if ( ! defined( 'ADVANCEDCACHEPROBLEM' ) ) {
+			define( 'ADVANCEDCACHEPROBLEM', 1 ); // force an update of WPCACHEHOME
+		}
+	} else {
+		$wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
+		$wp_cache_file = WPCACHEHOME . 'advanced-cache.php';
+	}
+	$wp_cache_link = WP_CONTENT_DIR . '/advanced-cache.php';
 
-if ( !defined( 'WPCACHEHOME' ) ) {
-	define( 'WPCACHEHOME', dirname( __FILE__ ) . '/' );
-	$wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
-	$wp_cache_file = WPCACHEHOME . 'advanced-cache.php';
-} elseif ( WPCACHEHOME != dirname( __FILE__ ) . '/' ) {
-	$wp_cache_config_file_sample = dirname( __FILE__ ) . '/wp-cache-config-sample.php';
-	$wp_cache_file = dirname( __FILE__ ) . '/advanced-cache.php';
-} else {
-	$wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
-	$wp_cache_file = WPCACHEHOME . 'advanced-cache.php';
+	if ( !defined( 'WP_CACHE' ) || ( defined( 'WP_CACHE' ) && constant( 'WP_CACHE' ) == false ) ) {
+		$wp_cache_check_wp_config = true;
+	}
 }
 
+wpsc_init();
+
 if( !@include($wp_cache_config_file) ) {
 	get_wpcachehome();
 	$wp_cache_config_file_sample = WPCACHEHOME . 'wp-cache-config-sample.php';
@@ -56,16 +69,13 @@ if( !@include($wp_cache_config_file) ) {
 	get_wpcachehome();
 }
 
-$wp_cache_link = WP_CONTENT_DIR . '/advanced-cache.php';
-
-if( !defined( 'WP_CACHE' ) || ( defined( 'WP_CACHE' ) && constant( 'WP_CACHE' ) == false ) ) {
-	$wp_cache_check_wp_config = true;
-}
-
 include(WPCACHEHOME . 'wp-cache-base.php');
+if ( class_exists( 'WP_REST_Controller' ) ) {
+	include( dirname( __FILE__ ) . '/rest/load.php' );
+}
 
 function wp_super_cache_text_domain() {
-	load_plugin_textdomain( 'wp-super-cache', WPCACHEHOME . 'languages', basename( dirname( __FILE__ ) ) . '/languages' );
+	load_plugin_textdomain( 'wp-super-cache', false, basename( dirname( __FILE__ ) ) . '/languages' );
 }
 add_action( 'init', 'wp_super_cache_text_domain' );
 
@@ -117,18 +127,24 @@ function wpsupercache_uninstall() {
 	global $wp_cache_config_file, $wp_cache_link, $cache_path;
 	$files = array( $wp_cache_config_file, $wp_cache_link );
 	foreach( $files as $file ) {
-		if ( file_exists( $file ) )
+		if ( null !== $file && '' !== $file && file_exists( $file ) ) {
 			unlink( $file );
+		}
 	}
+
 	if ( !function_exists( 'wp_cache_debug' ) )
 		include_once( 'wp-cache-phase1.php' );
 	if ( !function_exists( 'prune_super_cache' ) )
 		include_once( 'wp-cache-phase2.php' );
-	prune_super_cache( $cache_path, true );
+
 	wp_cache_remove_index();
-	@unlink( $cache_path . '.htaccess' );
-	@unlink( $cache_path . 'meta' );
-	@unlink( $cache_path . 'supercache' );
+
+	if ( null !== $cache_path && '' !== $cache_path ) {
+		@unlink( $cache_path . '.htaccess' );
+		@unlink( $cache_path . 'meta' );
+		@unlink( $cache_path . 'supercache' );
+	}
+
 	wp_clear_scheduled_hook( 'wp_cache_check_site_hook' );
 	wp_clear_scheduled_hook( 'wp_cache_gc' );
 	wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
@@ -159,11 +175,34 @@ function wpsupercache_deactivate() {
 register_deactivation_hook( __FILE__, 'wpsupercache_deactivate' );
 
 function wpsupercache_activate() {
+	global $cache_path;
+	if ( ! isset( $cache_path ) || $cache_path == '' )
+		$cache_path = WP_CONTENT_DIR . '/cache/'; // from sample config file
+
+	ob_start();
+	wpsc_init();
+
+	if ( !wp_cache_check_link() ||
+		!wp_cache_verify_config_file() ||
+		!wp_cache_verify_cache_dir() ) {
+		$text = ob_get_contents();
+		ob_end_clean();
+		return false;
+	}
+	$text = ob_get_contents();
+	wp_cache_check_global_config();
+	ob_end_clean();
 	wp_schedule_single_event( time() + 10, 'wp_cache_add_site_cache_index' );
 }
 register_activation_hook( __FILE__, 'wpsupercache_activate' );
 
 function wpsupercache_site_admin() {
+	global $wp_version;
+
+	if ( version_compare( "4.8", $wp_version, "<=" ) ) {
+		return current_user_can( 'setup_network' );
+	}
+
 	if ( function_exists( 'is_super_admin' ) ) {
 		return is_super_admin();
 	} elseif ( function_exists( 'is_site_admin' ) ) {
@@ -175,12 +214,6 @@ function wpsupercache_site_admin() {
 
 function wp_cache_add_pages() {
 	global $wpmu_version;
-	if ( function_exists( 'is_multisite' ) && is_multisite() && wpsupercache_site_admin() ) {
-		add_submenu_page( 'ms-admin.php', 'WP Super Cache', 'WP Super Cache', 'manage_options', 'wpsupercache', 'wp_cache_manager' );
-	} elseif ( isset( $wpmu_version ) && wpsupercache_site_admin() ) {
-		add_submenu_page( 'wpmu-admin.php', 'WP Super Cache', 'WP Super Cache', 'manage_options', 'wpsupercache', 'wp_cache_manager' );
-	}
-
 	if ( wpsupercache_site_admin() ) { // in single or MS mode add this menu item too, but only for superadmins in MS mode.
 		add_options_page( 'WP Super Cache', 'WP Super Cache', 'manage_options', 'wpsupercache', 'wp_cache_manager');
 	}
@@ -193,19 +226,19 @@ function wp_cache_network_pages() {
 add_action( 'network_admin_menu', 'wp_cache_network_pages' );
 
 function wp_cache_manager_error_checks() {
-	global $wpmu_version, $wp_cache_debug, $wp_cache_cron_check, $cache_enabled, $super_cache_enabled, $wp_cache_config_file, $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes, $wp_cache_mobile_browsers, $wp_cache_mobile_enabled, $wp_cache_mod_rewrite, $cache_path;
+	global $wp_cache_debug, $wp_cache_cron_check, $cache_enabled, $super_cache_enabled, $wp_cache_config_file, $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes, $wp_cache_mobile_browsers, $wp_cache_mobile_enabled, $wp_cache_mod_rewrite;
 	global $dismiss_htaccess_warning, $dismiss_readable_warning, $dismiss_gc_warning, $wp_cache_shutdown_gc;
 
 	if ( !wpsupercache_site_admin() )
 		return false;
 
 	if ( version_compare( PHP_VERSION, '5.3.0', '<' ) && ( 1 == ini_get( 'safe_mode' ) || "on" == strtolower( ini_get( 'safe_mode' ) ) ) ) {
-		echo '<div id="message" class="updated fade"><h3>' . __( 'Warning! PHP Safe Mode Enabled!', 'wp-super-cache' ) . '</h3><p>' .
-			__( 'You may experience problems running this plugin because SAFE MODE is enabled.', 'wp-super-cache' ) . ' ';
+		echo '<div class="notice notice-error"><h3>' . __( 'Warning! PHP Safe Mode Enabled!', 'wp-super-cache' ) . '</h3><p>' .
+			__( 'You may experience problems running this plugin because SAFE MODE is enabled.', 'wp-super-cache' ) . '<br />';
 
 
 		if( !ini_get( 'safe_mode_gid' ) ) {
-			_e( 'Your server is set up to check the owner of PHP scripts before allowing them to read and write files.', 'wp-super-cache' ) . " ";
+			echo __( 'Your server is set up to check the owner of PHP scripts before allowing them to read and write files.', 'wp-super-cache' ) . '<br />';
 			printf( __( 'You or an administrator may be able to make it work by changing the group owner of the plugin scripts to match that of the web server user. The group owner of the %s/cache/ directory must also be changed. See the <a href="http://php.net/features.safe-mode">safe mode manual page</a> for further details.', 'wp-super-cache' ), WP_CONTENT_DIR );
 		} else {
 			_e( 'You or an administrator must disable this. See the <a href="http://php.net/features.safe-mode">safe mode manual page</a> for further details. This cannot be disabled in a .htaccess file unfortunately. It must be done in the php.ini config file.', 'wp-super-cache' );
@@ -214,8 +247,8 @@ function wp_cache_manager_error_checks() {
 	}
 
 	if ( '' == get_option( 'permalink_structure' ) ) {
-		echo '<div id="message" class="updated fade"><h3>' . __( 'Permlink Structure Error', 'wp-super-cache' ) . '</h3>';
-		echo "<p>" . __( 'A custom url or permalink structure is required for this plugin to work correctly. Please go to the <a href="options-permalink.php">Permalinks Options Page</a> to configure your permalinks.' ) . "</p>";
+		echo '<div class="notice notice-error"><h3>' . __( 'Permlink Structure Error', 'wp-super-cache' ) . '</h3>';
+		echo "<p>" . __( 'A custom url or permalink structure is required for this plugin to work correctly. Please go to the <a href="options-permalink.php">Permalinks Options Page</a> to configure your permalinks.', 'wp-super-cache' ) . "</p>";
 		echo '</div>';
 		return false;
 	}
@@ -227,7 +260,7 @@ function wp_cache_manager_error_checks() {
 				$hostname = substr( $hostname, 0, strpos( $hostname, '/' ) );
 			$ip = gethostbyname( $hostname );
 			if( substr( $ip, 0, 3 ) == '127' || substr( $ip, 0, 7 ) == '192.168' ) {
-				?><div id="message" class="updated fade"><h3><?php printf( __( 'Warning! Your hostname "%s" resolves to %s', 'wp-super-cache' ), $hostname, $ip ); ?></h3>
+				?><div class="notice notice-warning"><h3><?php printf( __( 'Warning! Your hostname "%s" resolves to %s', 'wp-super-cache' ), $hostname, $ip ); ?></h3>
 					<p><?php printf( __( 'Your server thinks your hostname resolves to %s. Some services such as garbage collection by this plugin, and WordPress scheduled posts may not operate correctly.', 'wp-super-cache' ), $ip ); ?></p>
 					<p><?php printf( __( 'Please see entry 16 in the <a href="%s">Troubleshooting section</a> of the readme.txt', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/faq/' ); ?></p>
 					</div>
@@ -241,7 +274,7 @@ function wp_cache_manager_error_checks() {
 			$cron = wp_remote_get($cron_url, array('timeout' => 0.01, 'blocking' => true));
 			if( is_array( $cron ) ) {
 				if( $cron[ 'response' ][ 'code' ] == '404' ) {
-					?><div id="message" class="updated fade"><h3>Warning! wp-cron.php not found!</h3>
+					?><div class="notice notice-error"><h3>Warning! wp-cron.php not found!</h3>
 					<p><?php _e( 'Unfortunately, WordPress cannot find the file wp-cron.php. This script is required for the correct operation of garbage collection by this plugin, WordPress scheduled posts as well as other critical activities.', 'wp-super-cache' ); ?></p>
 					<p><?php printf( __( 'Please see entry 16 in the <a href="%s">Troubleshooting section</a> of the readme.txt', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/faq/' ); ?></p>
 					</div>
@@ -265,23 +298,23 @@ function wp_cache_manager_error_checks() {
 	}
 
 	if ( 1 == ini_get( 'zlib.output_compression' ) || "on" == strtolower( ini_get( 'zlib.output_compression' ) ) ) {
-		?><div id="message" class="updated fade"><h3><?php _e( 'Zlib Output Compression Enabled!', 'wp-super-cache' ); ?></h3>
+		?><div class="notice notice-warning"><h3><?php _e( 'Zlib Output Compression Enabled!', 'wp-super-cache' ); ?></h3>
 		<p><?php _e( 'PHP is compressing the data sent to the visitors of your site. Disabling this is recommended as the plugin caches the compressed output once instead of compressing the same page over and over again. Also see #21 in the Troubleshooting section. See <a href="http://php.net/manual/en/zlib.configuration.php">this page</a> for instructions on modifying your php.ini.', 'wp-super-cache' ); ?></p></div><?php
 	}
 
 	if( $cache_enabled == true && $super_cache_enabled == true && $wp_cache_mod_rewrite && !got_mod_rewrite() ) {
-		?><div id="message" class="updated fade"><h3><?php _e( 'Mod rewrite may not be installed!', 'wp-super-cache' ); ?></h3>
-		<p><?php _e( 'It appears that mod_rewrite is not installed. Sometimes this check isn&#8217;t 100% reliable, especially if you are not using Apache. Please verify that the mod_rewrite module is loaded. It is required for serving Super Cache static files. You will still be able to use legacy or PHP modes.', 'wp-super-cache' ); ?></p></div><?php
+		?><div class="notice notice-warning"><h3><?php _e( 'Mod rewrite may not be installed!', 'wp-super-cache' ); ?></h3>
+		<p><?php _e( 'It appears that mod_rewrite is not installed. Sometimes this check isn&#8217;t 100% reliable, especially if you are not using Apache. Please verify that the mod_rewrite module is loaded. It is required for serving Super Cache static files in expert mode. You will still be able to simple mode.', 'wp-super-cache' ); ?></p></div><?php
 	}
 
 	if( !is_writeable_ACLSafe( $wp_cache_config_file ) ) {
 		if ( !defined( 'SUBMITDISABLED' ) )
 			define( "SUBMITDISABLED", 'disabled style="color: #aaa" ' );
-		?><div id="message" class="updated fade"><h3><?php _e( 'Read Only Mode. Configuration cannot be changed.', 'wp-super-cache' ); ?></h3>
+		?><div class="notice notice-error"><h3><?php _e( 'Read Only Mode. Configuration cannot be changed.', 'wp-super-cache' ); ?></h3>
 		<p><?php printf( __( 'The WP Super Cache configuration file is <code>%s/wp-cache-config.php</code> and cannot be modified. That file must be writeable by the web server to make any changes.', 'wp-super-cache' ), WP_CONTENT_DIR ); ?>
 		<?php _e( 'A simple way of doing that is by changing the permissions temporarily using the CHMOD command or through your ftp client. Make sure it&#8217;s globally writeable and it should be fine.', 'wp-super-cache' ); ?></p>
 		<p><?php _e( '<a href="http://codex.wordpress.org/Changing_File_Permissions">This page</a> explains how to change file permissions.', 'wp-super-cache' ); ?></p>
-		<?php _e( 'Writeable:', 'wp-super-cache' ); ?> <code>chmod 666 <?php echo WP_CONTENT_DIR; ?>/wp-cache-config.php</code>
+		<?php _e( 'Writeable:', 'wp-super-cache' ); ?> <code>chmod 666 <?php echo WP_CONTENT_DIR; ?>/wp-cache-config.php</code><br />
 		<?php _e( 'Read-only:', 'wp-super-cache' ); ?> <code>chmod 644 <?php echo WP_CONTENT_DIR; ?>/wp-cache-config.php</code></p>
 		</div><?php
 	} elseif ( !defined( 'SUBMITDISABLED' ) ) {
@@ -300,7 +333,7 @@ function wp_cache_manager_error_checks() {
 		$gc_flag = get_gc_flag();
 		if ( $dismiss_gc_warning == 0 ) {
 			if ( false == maybe_stop_gc( $gc_flag ) && false == wp_next_scheduled( 'wp_cache_gc' ) ) {
-				?><div id="message" class="updated fade"><h3><?php _e( 'Warning! Garbage collection is not scheduled!', 'wp-super-cache' ); ?></h3>
+				?><div class="notice notice-warning"><h3><?php _e( 'Warning! Garbage collection is not scheduled!', 'wp-super-cache' ); ?></h3>
 				<p><?php _e( 'Garbage collection by this plugin clears out expired and old cached pages on a regular basis. Use <a href="#expirytime">this form</a> to enable it.', 'wp-super-cache' ); ?> </p>
 				<form action="" method="POST">
 				<input type="hidden" name="action" value="dismiss_gc_warning" />
@@ -327,7 +360,7 @@ function wp_cache_manager_error_checks() {
 		$wp_content_stat = stat(WP_CONTENT_DIR . '/');
 		$wp_content_mode = decoct( $wp_content_stat[ 'mode' ] & 0777 );
 		if( substr( $wp_content_mode, -2 ) == '77' ) {
-			?><div id="message" class="updated fade"><h3><?php printf( __( 'Warning! %s is writeable!', 'wp-super-cache' ), WP_CONTENT_DIR ); ?></h3>
+			?><div class="notice notice-warning"><h3><?php printf( __( 'Warning! %s is writeable!', 'wp-super-cache' ), WP_CONTENT_DIR ); ?></h3>
 			<p><?php printf( __( 'You should change the permissions on %s and make it more restrictive. Use your ftp client, or the following command to fix things:', 'wp-super-cache' ), WP_CONTENT_DIR ); ?> <code>chmod 755 <?php echo WP_CONTENT_DIR; ?>/</code></p>
 			<p><?php _e( '<a href="http://codex.wordpress.org/Changing_File_Permissions">This page</a> explains how to change file permissions.', 'wp-super-cache' ); ?></p>
 			<form action="" method="POST">
@@ -345,26 +378,26 @@ function wp_cache_manager_error_checks() {
 	if ( function_exists( "is_main_site" ) && true == is_main_site() ) {
 	$home_path = trailingslashit( get_home_path() );
 	$scrules = implode( "\n", extract_from_markers( $home_path.'.htaccess', 'WPSuperCache' ) );
-	if ( $cache_enabled && $wp_cache_mod_rewrite && !$wp_cache_mobile_enabled && strpos( $scrules, addcslashes( implode( '|', $wp_cache_mobile_browsers ), ' ' ) ) ) {
-		echo '<div id="message" class="updated fade"><h3>' . __( 'Mobile rewrite rules detected', 'wp-super-cache' ) . "</h3>";
+	if ( $cache_enabled && $wp_cache_mod_rewrite && !$wp_cache_mobile_enabled && strpos( $scrules, addcslashes( str_replace( ', ', '|', $wp_cache_mobile_browsers ), ' ' ) ) ) {
+		echo '<div class="notice notice-warning"><h3>' . __( 'Mobile rewrite rules detected', 'wp-super-cache' ) . "</h3>";
 		echo "<p>" . __( 'For best performance you should enable "Mobile device support" or delete the mobile rewrite rules in your .htaccess. Look for the 2 lines with the text "2.0\ MMP|240x320" and delete those.', 'wp-super-cache' ) . "</p><p>" . __( 'This will have no affect on ordinary users but mobile users will see uncached pages.', 'wp-super-cache' ) . "</p></div>";
 	} elseif ( $wp_cache_mod_rewrite && $cache_enabled && $wp_cache_mobile_enabled && $scrules != '' && (
-		( false == empty( $wp_cache_mobile_prefixes ) && false === strpos( $scrules, addcslashes( implode( '|', $wp_cache_mobile_prefixes ), ' ' ) ) ) ||
-		( false == empty( $wp_cache_mobile_browsers ) && false === strpos( $scrules, addcslashes( implode( '|', $wp_cache_mobile_browsers ), ' ' ) ) ) )
+		( '' != $wp_cache_mobile_prefixes && false === strpos( $scrules, addcslashes( str_replace( ', ', '|', $wp_cache_mobile_prefixes ), ' ' ) ) ) ||
+		( '' != $wp_cache_mobile_browsers && false === strpos( $scrules, addcslashes( str_replace( ', ', '|', $wp_cache_mobile_browsers ), ' ' ) ) ) )
 		) {
 		?>
-			<div id="message" class="updated fade"><h3><?php _e( 'Rewrite rules must be updated', 'wp-super-cache' ); ?></h3>
+			<div class="notice notice-warning"><h3><?php _e( 'Rewrite rules must be updated', 'wp-super-cache' ); ?></h3>
 			<p><?php _e( 'The rewrite rules required by this plugin have changed or are missing. ', 'wp-super-cache' ); ?>
-			<?php _e( 'Mobile support requires extra rules in your .htaccess file, or you can set the plugin to legacy mode. Here are your options (in order of difficulty):', 'wp-super-cache' ); ?>
-			<ol><li> <?php _e( 'Set the plugin to legacy mode and enable mobile support.', 'wp-super-cache' ); ?></li>
+			<?php _e( 'Mobile support requires extra rules in your .htaccess file, or you can set the plugin to simple mode. Here are your options (in order of difficulty):', 'wp-super-cache' ); ?>
+			<ol><li> <?php _e( 'Set the plugin to simple mode and enable mobile support.', 'wp-super-cache' ); ?></li>
 			<li> <?php _e( 'Scroll down the Advanced Settings page and click the <strong>Update Mod_Rewrite Rules</strong> button.', 'wp-super-cache' ); ?></li>
 			<li> <?php printf( __( 'Delete the plugin mod_rewrite rules in %s.htaccess enclosed by <code># BEGIN WPSuperCache</code> and <code># END WPSuperCache</code> and let the plugin regenerate them by reloading this page.', 'wp-super-cache' ), $home_path ); ?></li>
 			<li> <?php printf( __( 'Add the rules yourself. Edit %s.htaccess and find the block of code enclosed by the lines <code># BEGIN WPSuperCache</code> and <code># END WPSuperCache</code>. There are two sections that look very similar. Just below the line <code>%%{HTTP:Cookie} !^.*(comment_author_|%s|wp-postpass_).*$</code> add these lines: (do it twice, once for each section)', 'wp-super-cache' ), $home_path, wpsc_get_logged_in_cookie() ); ?></p>
-			<div style='padding: 2px; margin: 2px; border: 1px solid #333; width:400px; overflow: scroll'><pre><?php echo "RewriteCond %{HTTP_user_agent} !^.*(" . addcslashes( implode( '|', $wp_cache_mobile_browsers ), ' ' ) . ").*\nRewriteCond %{HTTP_user_agent} !^(" . addcslashes( implode( '|', $wp_cache_mobile_prefixes ), ' ' ) . ").*"; ?></pre></div></li></ol></div><?php
+			<div style='padding: 2px; margin: 2px; border: 1px solid #333; width:400px; overflow: scroll'><pre><?php echo "RewriteCond %{HTTP_user_agent} !^.*(" . addcslashes( str_replace( ', ', '|', $wp_cache_mobile_browsers ), ' ' ) . ").*\nRewriteCond %{HTTP_user_agent} !^(" . addcslashes( str_replace( ', ', '|', $wp_cache_mobile_prefixes ), ' ' ) . ").*"; ?></pre></div></li></ol></div><?php
 	}
 
 	if ( $cache_enabled && $super_cache_enabled && $wp_cache_mod_rewrite && $scrules == '' ) {
-		?><div id="message" class="updated fade"><h3><?php _e( 'Rewrite rules must be updated', 'wp-super-cache' ); ?></h3>
+		?><div class='notice notice-warning'><h3><?php _e( 'Rewrite rules must be updated', 'wp-super-cache' ); ?></h3>
 		<p><?php _e( 'The rewrite rules required by this plugin have changed or are missing. ', 'wp-super-cache' ); ?>
 		<?php _e( 'Scroll down the Advanced Settings page and click the <strong>Update Mod_Rewrite Rules</strong> button.', 'wp-super-cache' ); ?></p></div><?php
 	}
@@ -379,8 +412,8 @@ function wp_cache_manager_error_checks() {
 			}
 		}
 		if( isset( $missing_mods) && is_array( $missing_mods ) ) {
-			?><div id="message" class="updated fade"><h3><?php _e( 'Missing Apache Modules', 'wp-super-cache' ); ?></h3>
-			<p><?php __( 'The following Apache modules are missing. The plugin will work in legacy mode without them. In full Supercache mode, your visitors may see corrupted pages or out of date content however.', 'wp-super-cache' ); ?></p><?php
+			?><div class='notice notice-warning'><h3><?php _e( 'Missing Apache Modules', 'wp-super-cache' ); ?></h3>
+			<p><?php __( 'The following Apache modules are missing. The plugin will work in simple mode without them but in export mode, your visitors may see corrupted pages or out of date content however.', 'wp-super-cache' ); ?></p><?php
 			echo "<ul>";
 			foreach( $missing_mods as $req => $desc ) {
 				echo "<li> $req - $desc</li>";
@@ -399,8 +432,7 @@ function wp_cache_manager_error_checks() {
 	if ( isset( $disable_supercache_htaccess_warning ) == false )
 		$disable_supercache_htaccess_warning = false;
 	if ( $dismiss_htaccess_warning == 0 && $wp_cache_mod_rewrite && $super_cache_enabled && $disable_supercache_htaccess_warning == false && get_option( 'siteurl' ) != get_option( 'home' ) ) {
-		$home_dir = str_replace( get_option( 'home' ), '', get_option( 'siteurl' ) );
-		?><div id="message" class="updated fade"><h3><?php _e( '.htaccess file may need to be moved', 'wp-super-cache' ); ?></h3>
+		?><div class="notice notice-info"><h3><?php _e( '.htaccess file may need to be moved', 'wp-super-cache' ); ?></h3>
 		<p><?php _e( 'It appears you have WordPress installed in a sub directory as described <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">here</a>. Unfortunately, WordPress writes to the .htaccess in the install directory, not where your site is served from.<br />When you update the rewrite rules in this plugin you will have to copy the file to where your site is hosted. This will be fixed in the future.', 'wp-super-cache' ); ?></p>
 		<form action="" method="POST">
 		<input type="hidden" name="action" value="dismiss_htaccess_warning" />
@@ -427,10 +459,7 @@ function admin_bar_delete_page() {
 			return false; // Directory not found. Probably not cached.
 		if ( false == wp_cache_confirm_delete( $path ) || substr( $path, 0, strlen( get_supercache_dir() ) ) != get_supercache_dir() )
 			die( "Could not delete directory" );
-		$files = get_all_supercache_filenames( $path );
-		foreach( $files as $cache_file )
-			prune_super_cache( $path . $cache_file, true );
-
+		wpsc_delete_files( $path );
 		wp_redirect( preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', $_GET[ 'path' ] ) );
 		die();
 	}
@@ -440,7 +469,7 @@ if ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'delcachepage' )
 
 function wp_cache_manager_updates() {
 	global $wp_cache_mobile_enabled, $wp_cache_mfunc_enabled, $wp_supercache_cache_list, $wp_cache_config_file, $wp_cache_hello_world, $wp_cache_clear_on_post_edit, $cache_rebuild_files, $wp_cache_mutex_disabled, $wp_cache_not_logged_in, $wp_cache_make_known_anon, $cache_path, $wp_cache_object_cache, $_wp_using_ext_object_cache, $wp_cache_refresh_single_only, $cache_compression, $wp_cache_mod_rewrite, $wp_supercache_304, $wp_super_cache_late_init, $wp_cache_front_page_checks, $cache_page_secret, $wp_cache_disable_utf8, $wp_cache_no_cache_for_get;
-	global $cache_schedule_type, $cache_scheduled_time, $cache_max_time, $cache_time_interval, $wp_cache_shutdown_gc;
+	global $cache_schedule_type, $cache_max_time, $cache_time_interval, $wp_cache_shutdown_gc, $wpsc_save_headers;
 
 	if ( !wpsupercache_site_admin() )
 		return false;
@@ -458,8 +487,8 @@ function wp_cache_manager_updates() {
 		$_POST[ 'action' ] = 'scupdates';
 		if( isset( $_POST[ 'wp_cache_easy_on' ] ) && $_POST[ 'wp_cache_easy_on' ] == 1 ) {
 			$_POST[ 'wp_cache_mobile_enabled' ] = 1;
-			$_POST[ 'wp_cache_status' ] = 'all';
-			$_POST[ 'super_cache_enabled' ] = 2; // PHP
+			$_POST[ 'wp_cache_enabled' ] = 1;
+			$_POST[ 'super_cache_enabled' ] = 1;
 			$_POST[ 'cache_rebuild_files' ] = 1;
 			unset( $_POST[ 'cache_compression' ] );
 			if ( $cache_path != WP_CONTENT_DIR . '/cache/' )
@@ -479,13 +508,12 @@ function wp_cache_manager_updates() {
 			}
 
 		} else {
-			unset( $_POST[ 'wp_cache_status' ] );
-			$_POST[ 'super_cache_enabled' ] = 0;
+			unset( $_POST[ 'wp_cache_enabled' ] );
 			wp_clear_scheduled_hook( 'wp_cache_check_site_hook' );
 			wp_clear_scheduled_hook( 'wp_cache_gc' );
 			wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
 		}
-		$advanced_settings = array( 'wp_super_cache_late_init', 'wp_cache_disable_utf8', 'wp_cache_no_cache_for_get', 'wp_supercache_304', 'wp_cache_mfunc_enabled', 'wp_cache_mobile_enabled', 'wp_cache_front_page_checks', 'wp_supercache_cache_list', 'wp_cache_hello_world', 'wp_cache_clear_on_post_edit', 'wp_cache_not_logged_in', 'wp_cache_make_known_anon','wp_cache_object_cache', 'wp_cache_refresh_single_only', 'cache_compression', 'wp_cache_mutex_disabled' );
+		$advanced_settings = array( 'wp_super_cache_late_init', 'wp_cache_disable_utf8', 'wp_cache_no_cache_for_get', 'wp_supercache_304', 'wp_cache_mfunc_enabled', 'wp_cache_mobile_enabled', 'wp_cache_front_page_checks', 'wp_supercache_cache_list', 'wp_cache_hello_world', 'wp_cache_clear_on_post_edit', 'wp_cache_not_logged_in', 'wp_cache_make_known_anon','wp_cache_object_cache', 'wp_cache_refresh_single_only', 'cache_compression' );
 		foreach( $advanced_settings as $setting ) {
 			if ( isset( $$setting ) && $$setting == 1 ) {
 				$_POST[ $setting ] = 1;
@@ -494,8 +522,7 @@ function wp_cache_manager_updates() {
 	}
 
 	if( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'scupdates' ) {
-		if( isset( $_POST[ 'wp_cache_location' ] ) && $_POST[ 'wp_cache_location' ] != '' &&
-		    ( !isset( $cache_path ) || $_POST[ 'wp_cache_location' ] != $cache_path ) ) {
+		if( isset( $_POST[ 'wp_cache_location' ] ) && $_POST[ 'wp_cache_location' ] != '' ) {
 			$dir = realpath( trailingslashit( dirname( $_POST[ 'wp_cache_location' ] ) ) );
 			if ( $dir == false )
 				$dir = WP_CONTENT_DIR . '/cache/';
@@ -568,25 +595,27 @@ function wp_cache_manager_updates() {
 		}
 		wp_cache_replace_line('^ *\$wp_supercache_cache_list', "\$wp_supercache_cache_list = " . $wp_supercache_cache_list . ";", $wp_cache_config_file);
 
-		if ( isset( $_POST[ 'wp_cache_status' ] ) && 'all' == $_POST[ 'wp_cache_status' ] ) {
-			if ( $_POST[ 'wp_cache_status' ] == 'all' )
-					wp_cache_enable();
-
-			if ( isset( $_POST[ 'super_cache_enabled' ] ) ) {
-				if ( $_POST[ 'super_cache_enabled' ] == 0 ) {
-					wp_cache_enable(); // logged in cache
-					wp_super_cache_disable();
-				}
-				if( $_POST[ 'super_cache_enabled' ] == 1 ) {
-					$wp_cache_mod_rewrite = 1; // we need this because supercached files can be served by PHP too.
-				} else {
-					$wp_cache_mod_rewrite = 0; // cache files served by PHP
-				}
-				wp_cache_replace_line('^ *\$wp_cache_mod_rewrite', '$wp_cache_mod_rewrite = ' . $wp_cache_mod_rewrite . ";", $wp_cache_config_file);
+		if ( isset( $_POST[ 'wp_cache_enabled' ] ) ) {
+			wp_cache_enable();
+			if ( ! defined( 'DISABLE_SUPERCACHE' ) ) {
+				wp_cache_debug( 'DISABLE_SUPERCACHE is not set, super_cache enabled.' );
+				wp_super_cache_enable();
+				$super_cache_enabled = true;
 			}
 		} else {
 			wp_cache_disable();
+			wp_super_cache_disable();
+			$super_cache_enabled = false;
+		}
+
+		if ( isset( $_POST[ 'wp_cache_mod_rewrite' ] ) && $_POST[ 'wp_cache_mod_rewrite' ] == 1 ) {
+			$wp_cache_mod_rewrite = 1;
+			add_mod_rewrite_rules();
+		} else {
+			$wp_cache_mod_rewrite = 0; // cache files served by PHP
+			remove_mod_rewrite_rules();
 		}
+		wp_cache_setting( 'wp_cache_mod_rewrite', $wp_cache_mod_rewrite );
 
 		if( isset( $_POST[ 'wp_cache_hello_world' ] ) ) {
 			$wp_cache_hello_world = 1;
@@ -609,6 +638,13 @@ function wp_cache_manager_updates() {
 		}
 		wp_cache_replace_line('^ *\$cache_rebuild_files', "\$cache_rebuild_files = " . $cache_rebuild_files . ";", $wp_cache_config_file);
 
+		if ( isset( $_POST[ 'wpsc_save_headers' ] ) ) {
+			$wpsc_save_headers = 1;
+		} else {
+			$wpsc_save_headers = 0;
+		}
+		wp_cache_replace_line('^ *\$wpsc_save_headers', "\$wpsc_save_headers = " . $wpsc_save_headers . ";", $wp_cache_config_file);
+
 		if( isset( $_POST[ 'wp_cache_mutex_disabled' ] ) ) {
 			$wp_cache_mutex_disabled = 0;
 		} else {
@@ -651,7 +687,7 @@ function wp_cache_manager_updates() {
 		} else {
 			$wp_cache_refresh_single_only = 0;
 		}
-		wp_cache_replace_line('^ *\$wp_cache_refresh_single_only', "\$wp_cache_refresh_single_only = '" . $wp_cache_refresh_single_only . "';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_cache_refresh_single_only', $wp_cache_refresh_single_only );
 
 		if ( defined( 'WPSC_DISABLE_COMPRESSION' ) ) {
 			$cache_compression = 0;
@@ -663,7 +699,7 @@ function wp_cache_manager_updates() {
 				$new_cache_compression = 0;
 			}
 			if ( 1 == ini_get( 'zlib.output_compression' ) || "on" == strtolower( ini_get( 'zlib.output_compression' ) ) ) {
-				echo '<div id="message" class="updated fade">' . __( "<strong>Warning!</strong> You attempted to enable compression but <code>zlib.output_compression</code> is enabled. See #21 in the Troubleshooting section of the readme file.", 'wp-super-cache' ) . '</div>';
+				echo '<div class="notice notice-error">' . __( "<strong>Warning!</strong> You attempted to enable compression but <code>zlib.output_compression</code> is enabled. See #21 in the Troubleshooting section of the readme file.", 'wp-super-cache' ) . '</div>';
 			} else {
 				if ( $new_cache_compression != $cache_compression ) {
 					$cache_compression = $new_cache_compression;
@@ -682,9 +718,10 @@ if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'wpsupercache' )
 function wp_cache_manager() {
 	global $wp_cache_config_file, $valid_nonce, $supercachedir, $cache_path, $cache_enabled, $cache_compression, $super_cache_enabled, $wp_cache_hello_world;
 	global $wp_cache_clear_on_post_edit, $cache_rebuild_files, $wp_cache_mutex_disabled, $wp_cache_mobile_enabled, $wp_cache_mobile_browsers, $wp_cache_no_cache_for_get;
-	global $wp_cache_cron_check, $wp_cache_debug, $wp_cache_not_logged_in, $wp_cache_make_known_anon, $wp_supercache_cache_list, $cache_page_secret, $cache_home_path;
+	global $wp_cache_not_logged_in, $wp_cache_make_known_anon, $wp_supercache_cache_list, $cache_page_secret;
 	global $wp_super_cache_front_page_check, $wp_cache_object_cache, $_wp_using_ext_object_cache, $wp_cache_refresh_single_only, $wp_cache_mobile_prefixes;
-	global $wpmu_version, $cache_max_time, $wp_cache_mod_rewrite, $wp_supercache_304, $wp_super_cache_late_init, $wp_cache_front_page_checks, $wp_cache_disable_utf8, $wp_cache_mfunc_enabled;
+	global $wp_cache_mod_rewrite, $wp_supercache_304, $wp_super_cache_late_init, $wp_cache_front_page_checks, $wp_cache_disable_utf8, $wp_cache_mfunc_enabled;
+	global $wp_super_cache_comments, $wp_cache_home_path, $wpsc_save_headers;
 
 	if ( !wpsupercache_site_admin() )
 		return false;
@@ -712,6 +749,9 @@ function wp_cache_manager() {
 	$mobile_groups = apply_filters( 'cached_mobile_groups', array() ); // Group mobile user agents by capabilities. Lump them all together by default
 	// mobile_groups = array( 'apple' => array( 'ipod', 'iphone' ), 'nokia' => array( 'nokia5800', 'symbianos' ) );
 
+	$wp_cache_mobile_browsers = implode( ', ', $wp_cache_mobile_browsers );
+	$wp_cache_mobile_prefixes = implode( ', ', $wp_cache_mobile_prefixes );
+
 	if ( false == apply_filters( 'wp_super_cache_error_checking', true ) )
 		return false;
 
@@ -754,6 +794,7 @@ jQuery(document).ready(function(){
 #nav h2 {
 	border-bottom: 1px solid #ccc;
 	padding-bottom: 0;
+	height: 2em;
 }
 table.wpsc-settings-table {
 	clear: both;
@@ -771,13 +812,60 @@ table.wpsc-settings-table {
 		$wp_cache_mod_rewrite = 1;
 	}
 
-	if ( !isset( $_GET[ 'tab' ] ) )
-		$_GET[ 'tab' ] = '';
-
-	if ( $_GET[ 'tab' ] == '' && $cache_enabled && ( $wp_cache_mod_rewrite || $super_cache_enabled == false ) ) {
+	if ( ! isset( $_GET[ 'tab' ] ) && $cache_enabled && ( $wp_cache_mod_rewrite || $super_cache_enabled == false ) ) {
 		$_GET[ 'tab' ] = 'settings';
-		echo '<div id="message" class="updated fade"><p>' .  __( 'Notice: <em>Mod_rewrite or Legacy caching enabled</em>. Showing Advanced Settings Page by default.', 'wp-super-cache' ) . '</p></div>';
+		echo '<div class="notice notice-info is-dismissible"><p>' .  __( 'Notice: <em>Expert mode caching enabled</em>. Showing Advanced Settings Page by default.', 'wp-super-cache' ) . '</p></div>';
+	}
+	if ( ! isset( $_GET[ 'tab' ] ) ) {
+		$_GET[ 'tab' ] = 'easy';
+	}
+
+	if ( $_GET[ 'tab' ] == 'preload' ) {
+		if ( $super_cache_enabled == true && false == defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
+			global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $wpdb;
+			$count = wpsc_post_count();
+			if ( $count > 1000 ) {
+				$min_refresh_interval = 720;
+			} else {
+				$min_refresh_interval = 30;
+			}
+			$return = wpsc_preload_settings( $min_refresh_interval );
+			$msg = '';
+			if ( empty( $return ) == false ) {
+				foreach( $return as $message ) {
+					$msg .= $message;
+				}
+			}
+			$currently_preloading = false;
+
+			$preload_counter = get_option( 'preload_cache_counter' );
+			if ( isset( $preload_counter[ 'first' ] ) ) // converted from int to array
+				update_option( 'preload_cache_counter', array( 'c' => $preload_counter[ 'c' ], 't' => time() ) );
+			if ( is_array( $preload_counter ) && $preload_counter[ 'c' ] > 0 ) {
+				$msg .= '<p>' . sprintf( __( 'Currently caching from post %d to %d.', 'wp-super-cache' ), ( $preload_counter[ 'c' ] - 100 ), $preload_counter[ 'c' ] ) . '</p>';
+				$currently_preloading = true;
+				if ( @file_exists( $cache_path . "preload_permalink.txt" ) ) {
+					$url = file_get_contents( $cache_path . "preload_permalink.txt" );
+					$msg .="<p>" . sprintf( __( "<strong>Page last cached:</strong> %s", 'wp-super-cache' ), $url ) . "</p>";
+				}
+				if ( $msg != '' ) {
+					echo '<div class="notice notice-warning"><h3>' . __( 'Preload Active', 'wp-super-cache' ) . '</h3>' . $msg;
+					echo '<form name="do_preload" action="" method="POST">';
+					echo '<input type="hidden" name="action" value="preload" />';
+					echo '<input type="hidden" name="page" value="wpsupercache" />';
+					echo '<p><input class="button-primary" type="submit" name="preload_off" value="' . __( 'Cancel Cache Preload', 'wp-super-cache' ) . '" /></p>';
+					wp_nonce_field('wp-cache');
+					echo '</form>';
+					echo '</div>';
+				}
+			}
+			next_preload_message( 'wp_cache_preload_hook', __( 'Refresh of cache in %d hours %d minutes and %d seconds.', 'wp-super-cache' ), 60 );
+			next_preload_message( 'wp_cache_full_preload_hook', __( 'Full refresh of cache in %d hours %d minutes and %d seconds.', 'wp-super-cache' ) );
+
+		}
 	}
+
+
 	wpsc_admin_tabs();
 
 	if ( isset( $wp_super_cache_front_page_check ) && $wp_super_cache_front_page_check == 1 && !wp_next_scheduled( 'wp_cache_check_site_hook' ) ) {
@@ -797,10 +885,12 @@ table.wpsc-settings-table {
 	}
 	$home_path = parse_url( site_url() );
 	$home_path = trailingslashit( array_key_exists( 'path', $home_path ) ? $home_path[ 'path' ] : '' );
-	if (! isset( $wp_cache_home_path ) )
+	if (! isset( $wp_cache_home_path ) ) {
 		$wp_cache_home_path = '/';
+		wp_cache_setting( 'wp_cache_home_path', '/' );
+	}
 	if ( "$home_path" != "$wp_cache_home_path" )
-		wp_cache_replace_line('^ *\$wp_cache_home_path', "\$wp_cache_home_path = '$home_path';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_cache_home_path', $home_path );
 
 
 	if( $wp_cache_mobile_enabled == 1 ) {
@@ -822,96 +912,17 @@ table.wpsc-settings-table {
 			wp_die( __( 'Caching must be enabled to use this feature', 'wp-super-cache' ) );
 		echo '<a name="preload"></a>';
 		if ( $super_cache_enabled == true && false == defined( 'DISABLESUPERCACHEPRELOADING' ) ) {
-			global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $wpdb;
-			$count = $wpdb->get_var( "SELECT count(*) FROM {$wpdb->posts} WHERE post_status = 'publish'" );
-			if ( $count > 1000 ) {
-				$min_refresh_interval = 720;
-			} else {
-				$min_refresh_interval = 30;
-			}
-			if ( array_key_exists('action', $_POST) && $_POST[ 'action' ] == 'preload' && $valid_nonce ) {
-				if ( $_POST[ 'posts_to_cache' ] == 'all' ) {
-					$wp_cache_preload_posts = 'all';
-				} else {
-					$wp_cache_preload_posts = (int)$_POST[ 'posts_to_cache' ];
-				}
-				wp_cache_replace_line('^ *\$wp_cache_preload_posts', "\$wp_cache_preload_posts = '$wp_cache_preload_posts';", $wp_cache_config_file);
-
-				if ( isset( $_POST[ 'preload' ] ) && $_POST[ 'preload' ] == __( 'Cancel Cache Preload', 'wp-super-cache' ) ) {
-					$next_preload = wp_next_scheduled( 'wp_cache_preload_hook' );
-					if ( $next_preload ) {
-						update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
-						wp_unschedule_event( $next_preload, 'wp_cache_preload_hook' );
-					}
-					$fp = @fopen( $cache_path . "stop_preload.txt", 'w' );
-					@fclose( $fp );
-					echo "<p><strong>" . __( 'Scheduled preloading of cache almost cancelled. It may take up to a minute for it to cancel completely.', 'wp-super-cache' ) . "</strong></p>";
-				} elseif ( isset( $_POST[ 'custom_preload_interval' ] ) && ( $_POST[ 'custom_preload_interval' ] == 0 || $_POST[ 'custom_preload_interval' ] >= $min_refresh_interval ) ) {
-					// if preload interval changes than unschedule any preload jobs and schedule any new one.
-					$_POST[ 'custom_preload_interval' ] = (int)$_POST[ 'custom_preload_interval' ];
-					if ( $wp_cache_preload_interval != $_POST[ 'custom_preload_interval' ] ) {
-						$next_preload = wp_next_scheduled( 'wp_cache_full_preload_hook' );
-						if ( $next_preload ) {
-							update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
-							add_option( 'preload_cache_stop', 1 );
-							wp_unschedule_event( $next_preload, 'wp_cache_full_preload_hook' );
-							if ( $wp_cache_preload_interval == 0 ) {
-								echo "<p><strong>" . __( 'Scheduled preloading of cache cancelled.', 'wp-super-cache' ) . "</strong></p>";
-							}
-						}
-						if ( $_POST[ 'custom_preload_interval' ] != 0 )
-							wp_schedule_single_event( time() + ( $_POST[ 'custom_preload_interval' ] * 60 ), 'wp_cache_full_preload_hook' );
-					}
-					$wp_cache_preload_interval = (int)$_POST[ 'custom_preload_interval' ];
-					wp_cache_replace_line('^ *\$wp_cache_preload_interval', "\$wp_cache_preload_interval = $wp_cache_preload_interval;", $wp_cache_config_file);
-					if ( isset( $_POST[ 'preload_email_me' ] ) ) {
-						$wp_cache_preload_email_me = 1;
-					} else {
-						$wp_cache_preload_email_me = 0;
-					}
-					wp_cache_replace_line('^ *\$wp_cache_preload_email_me', "\$wp_cache_preload_email_me = $wp_cache_preload_email_me;", $wp_cache_config_file);
-					if ( isset( $_POST[ 'wp_cache_preload_email_volume' ] ) && in_array( $_POST[ 'wp_cache_preload_email_volume' ], array( 'less', 'medium', 'many' ) ) ) {
-						$wp_cache_preload_email_volume = $_POST[ 'wp_cache_preload_email_volume' ];
-					} else {
-						$wp_cache_preload_email_volume = 'medium';
-					}
-					wp_cache_replace_line('^ *\$wp_cache_preload_email_volume', "\$wp_cache_preload_email_volume = '$wp_cache_preload_email_volume';", $wp_cache_config_file);
-					if ( isset( $_POST[ 'preload_taxonomies' ] ) ) {
-						$wp_cache_preload_taxonomies = 1;
-					} else {
-						$wp_cache_preload_taxonomies = 0;
-					}
-					wp_cache_replace_line('^ *\$wp_cache_preload_taxonomies', "\$wp_cache_preload_taxonomies = $wp_cache_preload_taxonomies;", $wp_cache_config_file);
-					if ( isset( $_POST[ 'preload_on' ] ) ) {
-						$wp_cache_preload_on = 1;
-					} else {
-						$wp_cache_preload_on = 0;
-					}
-					wp_cache_replace_line('^ *\$wp_cache_preload_on', "\$wp_cache_preload_on = $wp_cache_preload_on;", $wp_cache_config_file);
-					if ( isset( $_POST[ 'preload' ] ) && $_POST[ 'preload' ] == __( 'Preload Cache Now', 'wp-super-cache' ) ) {
-						@unlink( $cache_path . "preload_mutex.tmp" );
-						update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
-						wp_schedule_single_event( time() + 10, 'wp_cache_preload_hook' );
-						echo "<p><strong>" . __( 'Scheduled preloading of cache in 10 seconds.' ) . "</strong></p>";
-					} elseif ( (int)$_POST[ 'custom_preload_interval' ] ) {
-						@unlink( $cache_path . "preload_mutex.tmp" );
-						update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
-						wp_schedule_single_event( time() + ( (int)$_POST[ 'custom_preload_interval' ] * 60 ), 'wp_cache_full_preload_hook' );
-						echo "<p><strong>" . sprintf( __( 'Scheduled preloading of cache in %d minutes', 'wp-super-cache' ), (int)$_POST[ 'custom_preload_interval' ] ) . "</strong></p>";
-					}
-				}
-			}
 			echo '<p>' . __( 'This will cache every published post and page on your site. It will create supercache static files so unknown visitors (including bots) will hit a cached page. This will probably help your Google ranking as they are using speed as a metric when judging websites now.', 'wp-super-cache' ) . '</p>';
 			echo '<p>' . __( 'Preloading creates lots of files however. Caching is done from the newest post to the oldest so please consider only caching the newest if you have lots (10,000+) of posts. This is especially important on shared hosting.', 'wp-super-cache' ) . '</p>';
-			echo '<p>' . __( 'In &#8217;Preload Mode&#8217; regular garbage collection will only clean out old legacy files for known users, not the preloaded supercache files. This is a recommended setting when the cache is preloaded.', 'wp-super-cache' ) . '</p>';
+			echo '<p>' . __( 'In &#8217;Preload Mode&#8217; regular garbage collection will be disabled so that old cache files are not deleted. This is a recommended setting when the cache is preloaded.', 'wp-super-cache' ) . '</p>';
 			echo '<form name="cache_filler" action="" method="POST">';
 			echo '<input type="hidden" name="action" value="preload" />';
 			echo '<input type="hidden" name="page" value="wpsupercache" />';
-			echo '<p>' . sprintf( __( 'Refresh preloaded cache files every %s minutes. (0 to disable, minimum %d minutes.)', 'wp-super-cache' ), "<input type='text' size=4 name='custom_preload_interval' value='" . (int)$wp_cache_preload_interval . "' />", $min_refresh_interval ) . '</p>';
+			echo '<p>' . sprintf( __( 'Refresh preloaded cache files every %s minutes. (0 to disable, minimum %d minutes.)', 'wp-super-cache' ), "<input type='text' size=4 name='wp_cache_preload_interval' value='" . (int)$wp_cache_preload_interval . "' />", $min_refresh_interval ) . '</p>';
 			if ( $count > 100 ) {
 				$step = (int)( $count / 10 );
 
-				$select = "<select name='posts_to_cache' size=1>";
+				$select = "<select name='wp_cache_preload_posts' size=1>";
 				$select .= "<option value='all' ";
 				if ( !isset( $wp_cache_preload_posts ) || $wp_cache_preload_posts == 'all' ) {
 					$checked = 'selectect=1 ';
@@ -935,55 +946,46 @@ table.wpsc-settings-table {
 				$select .= "</select>";
 				echo '<p>' . sprintf( __( 'Preload %s posts.', 'wp-super-cache' ), $select ) . '</p>';
 			} else {
-				echo '<input type="hidden" name="posts_to_cache" value="' . $count . '" />';
+				echo '<input type="hidden" name="wp_cache_preload_posts" value="' . $count . '" />';
 			}
 
-			echo '<input type="checkbox" name="preload_on" value="1" ';
+			echo '<input type="checkbox" name="wp_cache_preload_on" value="1" ';
 			echo $wp_cache_preload_on == 1 ? 'checked=1' : '';
-			echo ' /> ' . __( 'Preload mode (garbage collection only on legacy cache files. Recommended.)', 'wp-super-cache' ) . '<br />';
-			echo '<input type="checkbox" name="preload_taxonomies" value="1" ';
+			echo ' /> ' . __( 'Preload mode (garbage collection disabled. Recommended.)', 'wp-super-cache' ) . '<br />';
+			echo '<input type="checkbox" name="wp_cache_preload_taxonomies" value="1" ';
 			echo $wp_cache_preload_taxonomies == 1 ? 'checked=1' : '';
 			echo ' /> ' . __( 'Preload tags, categories and other taxonomies.', 'wp-super-cache' ) . '<br />';
-			echo '<input type="checkbox" name="preload_email_me" value="1" ';
-			echo $wp_cache_preload_email_me == 1 ? 'checked=1' : '';
-			echo ' /> ' . __( 'Send me status emails when files are refreshed.', 'wp-super-cache' ) . '<br />';
+			echo __( 'Send me status emails when files are refreshed.', 'wp-super-cache' ) . '<br />';
 			if ( !isset( $wp_cache_preload_email_volume ) )
-				$wp_cache_preload_email_volume = 'many';
-			echo '&nbsp;&nbsp;&nbsp;&nbsp;<input name="wp_cache_preload_email_volume" type="radio" value="many" class="tog" ';
-			checked( 'many', $wp_cache_preload_email_volume );
-			echo '/> ' . __( 'Many emails, 2 emails per 100 posts.', 'wp-super-cache' ) . '<br >';
-			echo '&nbsp;&nbsp;&nbsp;&nbsp;<input name="wp_cache_preload_email_volume" type="radio" value="medium" class="tog" ';
-			checked( 'medium', $wp_cache_preload_email_volume );
-			echo '/> ' . __( 'Medium, 1 email per 100 posts.', 'wp-super-cache' ) . '<br >';
-			echo '&nbsp;&nbsp;&nbsp;&nbsp;<input name="wp_cache_preload_email_volume" type="radio" value="less" class="tog" ';
-			checked( 'less', $wp_cache_preload_email_volume );
-			echo '/> ' . __( 'Less emails, 1 at the start and 1 at the end of preloading all posts.', 'wp-super-cache' ) . '<br >';
-
-			$currently_preloading = false;
-
-			next_preload_message( 'wp_cache_preload_hook', __( 'Refresh of cache in %d hours %d minutes and %d seconds.', 'wp-super-cache' ), 60 );
-			next_preload_message( 'wp_cache_full_preload_hook', __( 'Full refresh of cache in %d hours %d minutes and %d seconds.', 'wp-super-cache' ) );
-
-			$preload_counter = get_option( 'preload_cache_counter' );
-			if ( isset( $preload_counter[ 'first' ] ) ) // converted from int to array
-				update_option( 'preload_cache_counter', array( 'c' => $preload_counter[ 'c' ], 't' => time() ) );
-			if ( is_array( $preload_counter ) && $preload_counter[ 'c' ] > 0 ) {
-				echo '<p><strong>' . sprintf( __( 'Currently caching from post %d to %d.', 'wp-super-cache' ), ( $preload_counter[ 'c' ] - 100 ), $preload_counter[ 'c' ] ) . '</strong></p>';
+				$wp_cache_preload_email_volume = 'none';
+			echo '<select type="select" name="wp_cache_preload_email_volume">';
+			echo '<option value="none" '. selected( 'none', $wp_cache_preload_email_volume ) . '>'.  __( 'No Emails', 'wp-super-cache' ) . '</option>';
+			echo '<option value="many" '. selected( 'many', $wp_cache_preload_email_volume ) . '>'.  __( 'Many emails, 2 emails per 100 posts.', 'wp-super-cache' ) . '</option>';
+			echo '<option value="medium" '. selected( 'medium', $wp_cache_preload_email_volume ) . '>'.  __( 'Medium, 1 email per 100 posts.', 'wp-super-cache' ) . '</option>';
+			echo '<option value="less" '. selected( 'less', $wp_cache_preload_email_volume ) . '>'.  __( 'Less emails, 1 at the start and 1 at the end of preloading all posts.', 'wp-super-cache' ) . '</option>';
+			echo "</select>";
+
+			if ( wp_next_scheduled( 'wp_cache_preload_hook' ) || wp_next_scheduled( 'wp_cache_full_preload_hook' ) ) {
 				$currently_preloading = true;
-				if ( @file_exists( $cache_path . "preload_permalink.txt" ) ) {
-					$url = file_get_contents( $cache_path . "preload_permalink.txt" );
-					echo "<p>" . sprintf( __( "<strong>Page last cached:</strong> %s", 'wp-super-cache' ), $url ) . "</p>";
-				}
 			}
-			echo '<div class="submit"><input class="button-primary" type="submit" name="preload" value="' . __( 'Update Settings', 'wp-super-cache' ) . '" />&nbsp;<input class="button-secondary" type="submit" name="preload" value="' . __( 'Preload Cache Now', 'wp-super-cache' ) . '" />';
-			if ( $currently_preloading ) {
-				echo '&nbsp;<input class="button-primary" type="submit" name="preload" value="' . __( 'Cancel Cache Preload', 'wp-super-cache' ) . '" />';
+			echo '<div class="submit"><input class="button-primary" type="submit" name="preload" value="' . __( 'Update Settings', 'wp-super-cache' ) . '" />';
+			echo '</div>';
+			wp_nonce_field('wp-cache');
+			echo '</form>';
+			echo '<form name="do_preload" action="" method="POST">';
+			echo '<input type="hidden" name="action" value="preload" />';
+			echo '<input type="hidden" name="page" value="wpsupercache" />';
+			echo '<div class="submit">';
+			if ( false == $currently_preloading ) {
+				echo '<input class="button-primary" type="submit" name="preload_now" value="' . __( 'Preload Cache Now', 'wp-super-cache' ) . '" />';
+			} else {
+				echo '<input class="button-primary" type="submit" name="preload_off" value="' . __( 'Cancel Cache Preload', 'wp-super-cache' ) . '" />';
 			}
 			echo '</div>';
 			wp_nonce_field('wp-cache');
 			echo '</form>';
 		} else {
-			echo '<p>' . __( 'Preloading of cache disabled. Please disable legacy page caching or talk to your host administrator.', 'wp-super-cache' ) . '</p>';
+			echo '<div class="notice notice-warning"><p>' . __( 'Preloading of cache disabled. Please make sure simple or expert mode is enabled or talk to your host administrator.', 'wp-super-cache' ) . '</p></div>';
 		}
 		break;
 		case 'plugins':
@@ -1000,17 +1002,20 @@ table.wpsc-settings-table {
 		echo '<input type="hidden" name="action" value="scupdates" />';
 		?><table class="form-table">
 		<tr valign="top">
-			<th scope="row"><label for="wp_cache_status"><?php _e( 'Caching', 'wp-super-cache' ); ?></label></th>
+			<th scope="row"><label for="wp_cache_enabled"><?php _e( 'Caching', 'wp-super-cache' ); ?></label></th>
 			<td>
 				<fieldset>
-				<legend class="hidden">Caching</legend>
-				<label><input type='radio' name='wp_cache_status' value='all' <?php if ( $cache_enabled == true ) { echo 'checked=checked'; } ?>> <?php _e( 'Caching On', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
-				<label><input type='radio' name='wp_cache_status' value='0' <?php if ( $cache_enabled == false ) { echo 'checked=checked'; } ?>> <?php _e( 'Caching Off', 'wp-super-cache' ); ?></label><br /><br />
-				<label><input type='radio' name='super_cache_enabled' <?php if( $super_cache_enabled && $wp_cache_mod_rewrite == 1 ) echo "checked"; ?> value='1'> <?php _e( 'Use mod_rewrite to serve cache files.', 'wp-super-cache' ); ?></label><br />
-				<label><input type='radio' name='super_cache_enabled' <?php if( $wp_cache_mod_rewrite == 0 ) echo "checked"; ?> value='2'> <?php _e( 'Use PHP to serve cache files.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
-				<label><input type='radio' name='super_cache_enabled' <?php if( $super_cache_enabled == false ) echo "checked"; ?> value='0'> <?php _e( 'Legacy page caching.', 'wp-super-cache' ); ?></label><br />
-				<em><?php _e( 'Mod_rewrite is fastest, PHP is almost as fast and easier to get working, while legacy caching is slower again, but more flexible and also easy to get working. New users should use PHP caching.', 'wp-super-cache' ); ?></em><br />
-				</legend>
+				<legend class="hidden"><?php _e( 'Caching', 'wp-super-cache' ); ?></legend>
+				<label><input type='checkbox' name='wp_cache_enabled' value='1' <?php if ( $cache_enabled == true ) { echo 'checked=checked'; } ?>> <?php _e( 'Enable Caching', 'wp-super-cache' ); ?><br />
+				</fieldset>
+			</td>
+		</tr>
+		<tr valign="top">
+			<th scope="row"><label for="super_cache_enabled"><?php _e( 'Cache Delivery Method', 'wp-super-cache' ); ?></label></th>
+			<td>
+				<label><input type='radio' name='wp_cache_mod_rewrite' <?php if ( $wp_cache_mod_rewrite == 0 ) echo "checked"; ?> value='0'> <?php _e( '<acronym title="Use PHP to serve cached files">Simple</acronym>', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
+				<label><input type='radio' name='wp_cache_mod_rewrite' <?php if ( $wp_cache_mod_rewrite == 1 ) echo "checked"; ?> value='1'> <?php _e( '<acronym title="Use mod_rewrite to serve cached files">Expert</acronym>', 'wp-super-cache' ); ?></label><br />
+				<em><small class='description'><?php _e( 'Expert caching requires changes to important server files and may require manual intervention if enabled.', 'wp-super-cache' ); ?></small></em>
 				</fieldset>
 			</td>
 		</tr>
@@ -1019,6 +1024,8 @@ table.wpsc-settings-table {
 			<td>
 				<fieldset>
 				<legend class="hidden">Miscellaneous</legend>
+				<label><input type='checkbox' name='wp_cache_not_logged_in' <?php if ( $wp_cache_not_logged_in ) echo "checked"; ?> value='1'> <?php _e( 'Don&#8217;t cache pages for <acronym title="Logged in users and those that comment">known users</acronym>.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
+				<label><input type='checkbox' name='wp_cache_no_cache_for_get' <?php if( $wp_cache_no_cache_for_get ) echo "checked"; ?> value='1'> <?php _e( 'Don&#8217;t cache pages with GET parameters. (?x=y at the end of a url)', 'wp-super-cache' ); ?></label><br />
 				<?php if ( false == defined( 'WPSC_DISABLE_COMPRESSION' ) ) { ?>
 					<?php if ( false == function_exists( 'gzencode' ) ) { ?>
 						<em><?php _e( 'Warning! Compression is disabled as gzencode() function was not found.', 'wp-super-cache' ); ?></em><br />
@@ -1028,7 +1035,7 @@ table.wpsc-settings-table {
 					<?php }
 				}
 				?>
-				<label><input type='checkbox' name='wp_cache_not_logged_in' <?php if ( $wp_cache_not_logged_in ) echo "checked"; ?> value='1'> <?php _e( 'Don&#8217;t cache pages for <acronym title="Logged in users and those that comment">known users</acronym>.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
+				<label><input type='checkbox' name='wpsc_save_headers' <?php if ( $wpsc_save_headers ) echo "checked"; ?> value='1' /> <?php _e( 'Cache HTTP headers with page content.', 'wp-super-cache' ); ?></label><br />
 				<label><input type='checkbox' name='cache_rebuild_files' <?php if ( $cache_rebuild_files ) echo "checked"; ?> value='1'> <?php _e( 'Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
 				<?php
 				$disable_304 = true;
@@ -1044,7 +1051,6 @@ table.wpsc-settings-table {
 					?><em><?php _e( '304 support is disabled by default because some hosts have had problems with the headers used in the past.', 'wp-super-cache' ); ?></em><br /><?php
 				}
 				?>
-				<label><input type='checkbox' name='wp_cache_no_cache_for_get' <?php if( $wp_cache_no_cache_for_get ) echo "checked"; ?> value='1'> <?php _e( 'Don&#8217;t cache pages with GET parameters. (?x=y at the end of a url)', 'wp-super-cache' ); ?></label><br />
 				<label><input type='checkbox' name='wp_cache_make_known_anon' <?php if( $wp_cache_make_known_anon ) echo "checked"; ?> value='1'> <?php _e( 'Make known users anonymous so they&#8217;re served supercached static files.', 'wp-super-cache' ); ?></label><br />
 				<label><input type='checkbox' name='wp_cache_hello_world' <?php if( $wp_cache_hello_world ) echo "checked"; ?> value='1'> <?php printf( __( 'Proudly tell the world your server is <a href="%s">Stephen Fry proof</a>! (places a message in your blog&#8217;s footer)', 'wp-super-cache' ), 'https://twitter.com/#!/HibbsLupusTrust/statuses/136429993059291136' ); ?></label><br />
 				</legend>
@@ -1056,10 +1062,10 @@ table.wpsc-settings-table {
 			<td>
 				<fieldset>
 				<legend class="hidden">Advanced</legend>
-				<label><input type='checkbox' name='wp_cache_mfunc_enabled' <?php if( $wp_cache_mfunc_enabled ) echo "checked"; ?> value='1' <?php if ( $wp_cache_mod_rewrite ) { echo "disabled='disabled'"; } ?>> <?php _e( 'Enable dynamic caching. Requires PHP or legacy caching. (See <a href="http://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> or wp-super-cache/plugins/dynamic-cache-test.php for example code.)', 'wp-super-cache' ); ?></label><br />
+				<label><input type='checkbox' name='wp_cache_mfunc_enabled' <?php if( $wp_cache_mfunc_enabled ) echo "checked"; ?> value='1' <?php if ( $wp_cache_mod_rewrite ) { echo "disabled='disabled'"; } ?>> <?php _e( 'Enable dynamic caching. (See <a href="http://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> or wp-super-cache/plugins/dynamic-cache-test.php for example code.)', 'wp-super-cache' ); ?></label><br />
 				<label><input type='checkbox' name='wp_cache_mobile_enabled' <?php if( $wp_cache_mobile_enabled ) echo "checked"; ?> value='1'> <?php _e( 'Mobile device support. (External plugin or theme required. See the <a href="http://wordpress.org/plugins/wp-super-cache/faq/">FAQ</a> for further details.)', 'wp-super-cache' ); ?></label><br />
 				<?php if ( $wp_cache_mobile_enabled ) {
-					echo '<blockquote><h4>' . __( 'Mobile Browsers', 'wp-super-cache' ) . '</h4>' . implode( ', ', $wp_cache_mobile_browsers ) . "<br /><h4>" . __( 'Mobile Prefixes', 'wp-super-cache' ) . "</h4>" . implode( ', ', $wp_cache_mobile_prefixes ) . "<br /></blockquote>";
+					echo '<blockquote><h4>' . __( 'Mobile Browsers', 'wp-super-cache' ) . '</h4>' . esc_html( $wp_cache_mobile_browsers ) . "<br /><h4>" . __( 'Mobile Prefixes', 'wp-super-cache' ) . "</h4>" . esc_html( $wp_cache_mobile_prefixes ) . "<br /></blockquote>";
 				} ?>
 				<label><input type='checkbox' name='wp_cache_disable_utf8' <?php if( $wp_cache_disable_utf8 ) echo "checked"; ?> value='1'> <?php _e( 'Remove UTF8/blog charset support from .htaccess file. Only necessary if you see odd characters or punctuation looks incorrect. Requires rewrite rules update.', 'wp-super-cache' ); ?></label><br />
 				<label><input type='checkbox' name='wp_cache_clear_on_post_edit' <?php if( $wp_cache_clear_on_post_edit ) echo "checked"; ?> value='1'> <?php _e( 'Clear all cache files when a post or page is published or updated.', 'wp-super-cache' ); ?></label><br />
@@ -1069,7 +1075,7 @@ table.wpsc-settings-table {
 			<?php if( false == defined( 'WPSC_DISABLE_LOCKING' ) ) { ?>
 				<label><input type='checkbox' name='wp_cache_mutex_disabled' <?php if( !$wp_cache_mutex_disabled ) echo "checked"; ?> value='0'> <?php _e( 'Coarse file locking. You do not need this as it will slow down your website.', 'wp-super-cache' ); ?></label><br />
 			<?php } ?>
-				<label><input type='checkbox' name='wp_super_cache_late_init' <?php if( $wp_super_cache_late_init ) echo "checked"; ?> value='1'> <?php _e( 'Late init. Display cached files after WordPress has loaded. Most useful in legacy mode.', 'wp-super-cache' ); ?></label><br />
+				<label><input type='checkbox' name='wp_super_cache_late_init' <?php if( $wp_super_cache_late_init ) echo "checked"; ?> value='1'> <?php _e( 'Late init. Display cached files after WordPress has loaded.', 'wp-super-cache' ); ?></label><br />
 			<?php if ( $_wp_using_ext_object_cache ) {
 				?><label><input type='checkbox' name='wp_cache_object_cache' <?php if( $wp_cache_object_cache ) echo "checked"; ?> value='1'> <?php echo __( 'Use object cache to store cached files.', 'wp-super-cache' ) . ' ' . __( '(Experimental)', 'wp-super-cache' ); ?></label><?php
 			}?>
@@ -1091,9 +1097,9 @@ table.wpsc-settings-table {
 						<?php if ( get_site_option( 'wp_super_cache_index_detected' ) && strlen( $cache_path ) > strlen( ABSPATH ) && ABSPATH == substr( $cache_path, 0, strlen( ABSPATH ) ) ) {
 							$msg = __( 'The plugin detected a bare directory index in your cache directory, which would let visitors see your cache files directly and might expose private posts.', 'wp-super-cache' );
 							if ( $super_cache_enabled && $wp_cache_mod_rewrite == 1 ) {
-								$msg .= ' ' . __( 'You are using mod_rewrite to serve cache files so the plugin has added <q>Options -Indexes</q> to the .htaccess file in the cache directory to disable indexes. However, if that does not work, you should contact your system administrator or support and ask for them to be disabled, or use PHP mode and move the cache outside of the web root.' );
+								$msg .= ' ' . __( 'You are using expert mode to serve cache files so the plugin has added <q>Options -Indexes</q> to the .htaccess file in the cache directory to disable indexes. However, if that does not work, you should contact your system administrator or support and ask for them to be disabled, or use simple mode and move the cache outside of the web root.', 'wp-super-cache' );
 							} else {
-								$msg .= ' <strong>' . sprintf( __( 'index.html files have been added in key directories, but unless directory indexes are disabled, it is probably better to store the cache files outside of the web root of %s' ), ABSPATH ) . '</strong>';
+								$msg .= ' <strong>' . sprintf( __( 'index.html files have been added in key directories, but unless directory indexes are disabled, it is probably better to store the cache files outside of the web root of %s', 'wp-super-cache' ), ABSPATH ) . '</strong>';
 							}
 							echo "<li>$msg</li>";
 						} ?>
@@ -1112,7 +1118,7 @@ table.wpsc-settings-table {
 		<ol>
 		<li><?php _e( 'Uninstall this plugin on the plugins page. It will automatically clean up after itself. If manual intervention is required, then simple instructions are provided.', 'wp-super-cache' ); ?></li>
 		<li><?php printf( __( 'If uninstalling this plugin, make sure the directory <em>%s</em> is writeable by the webserver so the files <em>advanced-cache.php</em> and <em>cache-config.php</em> can be deleted automatically. (Making sure those files are writeable is probably a good idea!)', 'wp-super-cache' ), WP_CONTENT_DIR ); ?></li>
-		<li><?php printf( __( 'Please see the <a href="%1$s/wp-super-cache/readme.txt">readme.txt</a> for instructions on uninstalling this script. Look for the heading, "How to uninstall WP Super Cache".', 'wp-super-cache' ), WP_PLUGIN_URL ); ?></li><?php
+		<li><?php printf( __( 'Please see the <a href="%1$s/wp-super-cache/readme.txt">readme.txt</a> for instructions on uninstalling this script. Look for the heading, "How to uninstall WP Super Cache".', 'wp-super-cache' ), plugins_url() ); ?></li><?php
 		echo "<li><em>" . sprintf( __( 'Need help? Check the <a href="%1$s">Super Cache readme file</a>. It includes installation documentation, a FAQ and Troubleshooting tips. The <a href="%2$s">support forum</a> is also available. Your question may already have been answered.', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/', 'http://wordpress.org/tags/wp-super-cache?forum_id=10' ) . "</em></li>";
 		echo "</ol>";
 
@@ -1158,73 +1164,55 @@ table.wpsc-settings-table {
 			if ( $cache_enabled && !$wp_cache_mod_rewrite ) {
 				$scrules = trim( implode( "\n", extract_from_markers( trailingslashit( get_home_path() ) . '.htaccess', 'WPSuperCache' ) ) );
 				if ( $scrules != '' ) {
-					echo "<p><strong>" . __( 'Notice: PHP caching enabled but Supercache mod_rewrite rules detected. Cached files will be served using those rules. If your site is working ok, please ignore this message. Otherwise, you can edit the .htaccess file in the root of your install and remove the SuperCache rules.', 'wp-super-cache' ) . '</strong></p>';
+					echo "<p><strong>" . __( 'Notice: Simple caching enabled but Supercache mod_rewrite rules from expert mode detected. Cached files will be served using those rules. If your site is working ok, please ignore this message. Otherwise, you can edit the .htaccess file in the root of your install and remove the SuperCache rules.', 'wp-super-cache' ) . '</strong></p>';
 				}
 			}
 			echo "<div class='submit'><input class='button-primary' type='submit' " . SUBMITDISABLED . " value='" . __( 'Update Status', 'wp-super-cache' ) . "' /></div></form>";
 			if ( $cache_enabled ) {
 				echo "<h3>" . __( 'Cache Tester', 'wp-super-cache' ) . "</h3>";
 				echo '<p>' . __( 'Test your cached website by clicking the test button below.', 'wp-super-cache' ) . '</p>';
+				echo '<p>' . __( 'Note: if you use Cloudflare or other transparent front-end proxy service this test may fail.<ol><li> If you have Cloudflare minification enabled this plugin may detect differences in the pages and report an error.</li><li> Try using the development mode of Cloudflare to perform the test. You can disable development mode afterwards if the test succeeds.</li></ol>', 'wp-super-cache' ) . '</p>';
 				if ( array_key_exists('action', $_POST) && $_POST[ 'action' ] == 'test' && $valid_nonce ) {
 					$url = trailingslashit( get_bloginfo( 'url' ) );
 					if ( isset( $_POST[ 'httponly' ] ) )
 						$url = str_replace( 'https://', 'http://', $url );
-					// Prime the cache
-					echo "<p>" . sprintf(  __( 'Fetching %s to prime cache: ', 'wp-super-cache' ), $url );
-					$page = wp_remote_get( $url, array('timeout' => 60, 'blocking' => true ) );
-					echo '<span style="color: #0a0; font-weight: bold;">' . __( 'OK', 'wp-super-cache' ) . '</strong></p>';
-					sleep( 1 );
-					// Get the first copy
-					echo "<p>" . sprintf(  __( 'Fetching first copy of %s: ', 'wp-super-cache' ), $url );
-					$page = wp_remote_get( $url, array('timeout' => 60, 'blocking' => true ) );
-					if ( !is_wp_error( $page ) ) {
-						$fp = fopen( $cache_path . "1.html", "w" );
-						fwrite( $fp, $page[ 'body' ] );
-						fclose( $fp );
-						echo '<span style="color: #0a0; font-weight: bold;">' . __( 'OK', 'wp-super-cache' ) . "</span> (<a href='" . WP_CONTENT_URL . "/cache/1.html'>1.html</a>)</p>";
-						sleep( 1 );
-					} else {
-						echo '<span style="color: #a00; font-weight: bold;">' . __( 'FAILED', 'wp-super-cache' ) . "</span></p>";
-					}
-					// Get the second copy
-					echo "<p>" . sprintf(  __( 'Fetching second copy of %s: ', 'wp-super-cache' ), $url );
-					$page2 = wp_remote_get( $url, array('timeout' => 60, 'blocking' => true ) );
-					if ( !is_wp_error( $page2 ) ) {
-						$fp = fopen( $cache_path . "2.html", "w" );
-						fwrite( $fp, $page2[ 'body' ] );
-						fclose( $fp );
-						echo '<span style="color: #0a0; font-weight: bold;">' . __( 'OK', 'wp-super-cache' ) . "</span> (<a href='" . WP_CONTENT_URL . "/cache/2.html'>2.html</a>)</p>";
-					} else {
-						echo '<span style="color: #a00; font-weight: bold;">' . __( 'FAILED', 'wp-super-cache' ) . "</span></p>";
-					}
-
-					if ( is_wp_error( $page ) || is_wp_error( $page2 ) || $page[ 'response' ][ 'code' ] != 200 || $page2[ 'response' ][ 'code' ] != 200 ) {
-						echo '<p><span style="color: #a00; font-weight: bold;">' . __( 'One or more page requests failed:', 'wp-super-cache' ) . '</span></p>';
-						$error = false;
-						if ( is_wp_error( $page ) ) {
-							$error = $page;
-						} elseif ( is_wp_error( $page2 ) ) {
-							$error = $page2;
-						}
-						if ( $error ) {
+					$test_messages = array( __( 'Fetching %s to prime cache: ', 'wp-super-cache' ), __( 'Fetching first copy of %s: ', 'wp-super-cache' ), __( 'Fetching second copy of %s: ', 'wp-super-cache' ) );
+					$c = 0;
+					$cache_test_error = false;
+					$page = array();
+					foreach( $test_messages as $message ) {
+						echo "<p>" . sprintf( $message, $url );
+						$page[ $c ] = wp_remote_get( $url, array('timeout' => 60, 'blocking' => true ) );
+						if ( !is_wp_error( $page[ $c ] ) ) {
+							$fp = fopen( $cache_path . $c . ".html", "w" );
+							fwrite( $fp, $page[ $c ][ 'body' ] );
+							fclose( $fp );
+							echo '<span style="color: #0a0; font-weight: bold;">' . __( 'OK', 'wp-super-cache' ) . "</span> (<a href='" . WP_CONTENT_URL . "/cache/" . $c . ".html'>" . $c . ".html</a>)</p>";
+							sleep( 1 );
+						} else {
+							$cache_test_error = true;
+							echo '<span style="color: #a00; font-weight: bold;">' . __( 'FAILED', 'wp-super-cache' ) . "</span></p>";
 							$errors = '';
 							$messages = '';
-							foreach ( $error->get_error_codes() as $code ) {
-								$severity = $error->get_error_data($code);
-								foreach ( $error->get_error_messages( $code ) as $err ) {
-									$errors .= '	' . $err . "<br />\n";
+							foreach ( $page[ $c ]->get_error_codes() as $code ) {
+								$severity = $page[ $c ]->get_error_data( $code );
+								foreach ( $page[ $c ]->get_error_messages( $code ) as $err ) {
+									$errors .= $severity . ': ' . $err . "<br />\n";
 								}
 							}
-							if ( !empty($err) )
-								echo '<div class="updated fade">' . $errors . "</div>\n";
-						} else {
-							echo '<ul><li>' . sprintf( __( 'Page %d: %d (%s)', 'wp-super-cache' ), 1, $page[ 'response' ][ 'code' ], $page[ 'response' ][ 'message' ] ) . '</li>';
-							echo '<li>' . sprintf( __( 'Page %d: %d (%s)', 'wp-super-cache' ), 2, $page2[ 'response' ][ 'code' ], $page2[ 'response' ][ 'message' ] ) . '</li></ul>';
+							if ( '' != $errors )
+								echo "<p>" . sprintf( __( '<strong>Errors:</strong> %s', 'wp-super-cache' ), $errors ) . "</p>";
 						}
+						$c ++;
 					}
 
-					if ( ( !is_wp_error( $page ) && !is_wp_error( $page2 ) ) && preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 'body' ], $matches1 ) &&
-							preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page2[ 'body' ], $matches2 ) && $matches1[2] == $matches2[2] ) {
+					if ( false == $cache_test_error ) {
+						echo '<ul><li>' . sprintf( __( 'Page %d: %d (%s)', 'wp-super-cache' ), 1, $page[ 1 ][ 'response' ][ 'code' ], $page[ 1 ][ 'response' ][ 'message' ] ) . '</li>';
+						echo '<li>' . sprintf( __( 'Page %d: %d (%s)', 'wp-super-cache' ), 2, $page[ 2 ][ 'response' ][ 'code' ], $page[ 2 ][ 'response' ][ 'message' ] ) . '</li></ul>';
+					}
+
+					if ( false == $cache_test_error && preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 1 ][ 'body' ], $matches1 ) &&
+							preg_match( '/(Cached page generated by WP-Super-Cache on) ([0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*)/', $page[ 2 ][ 'body' ], $matches2 ) && $matches1[2] == $matches2[2] ) {
 						echo '<p>' . sprintf( __( 'Page 1: %s', 'wp-super-cache' ), $matches1[ 2 ] ) . '</p>';
 						echo '<p>' . sprintf( __( 'Page 2: %s', 'wp-super-cache' ), $matches2[ 2 ] ) . '</p>';
 						echo '<p><span style="color: #0a0; font-weight: bold;">' . __( 'The timestamps on both pages match!', 'wp-super-cache' ) . '</span></p>';
@@ -1235,14 +1223,18 @@ table.wpsc-settings-table {
 						echo '<li>' . __( 'Enable logging on the Debug page here. That should help you track down the problem.', 'wp-super-cache' ) . '</li>';
 						echo '<li>' . __( 'You should check Page 1 and Page 2 above for errors. Your local server configuration may not allow your website to access itself.', 'wp-super-cache' ) . '</li>';
 						echo "</ol>";
-
 					}
 				}
 				echo '<form name="cache_tester" action="" method="post">';
 				echo '<input type="hidden" name="action" value="test" />';
 				if ( isset( $_SERVER['HTTPS' ] ) && 'on' == strtolower( $_SERVER['HTTPS' ] ) )
 					echo "<input type='checkbox' name='httponly' checked='checked' value='1' /> " . __( 'Send non-secure (non https) request for homepage', 'wp-super-cache' );
-				echo '<div class="submit"><input class="button-secondary" type="submit" name="test" value="' . __( 'Test Cache', 'wp-super-cache' ) . '" /></div>';
+                if ( isset( $wp_super_cache_comments ) && $wp_super_cache_comments == 0 ) {
+                    echo "<p>" . __( '<strong>Warning!</strong> Cache comments are currently disabled. Please go to the Debug page and enable Cache Status Messages there. You should clear the cache before testing.', 'wp-super-cache' ) . "</p>";
+                    echo '<div class="submit"><input disabled style="color: #aaa" class="button-secondary" type="submit" name="test" value="' . __( 'Test Cache', 'wp-super-cache' ) . '" /></div>';
+                } else {
+                    echo '<div class="submit"><input class="button-secondary" type="submit" name="test" value="' . __( 'Test Cache', 'wp-super-cache' ) . '" /></div>';
+                }
 				wp_nonce_field('wp-cache');
 				echo '</form>';
 			}
@@ -1257,18 +1249,20 @@ table.wpsc-settings-table {
 			if ( ( defined( 'VHOST' ) || defined( 'SUBDOMAIN_INSTALL' ) || defined( 'SUNRISE' ) || ( defined( 'WP_ALLOW_MULTISITE' ) && constant( 'WP_ALLOW_MULTISITE' ) == true  ) ) && wpsupercache_site_admin() ) {
 				echo '<form name="wp_cache_content_delete" action="#listfiles" method="post">';
 				echo '<input type="hidden" name="wp_delete_all_cache" />';
-				echo '<div class="submit" style="float:left;margin-left:10px"><input id="deleteallpost" class="button-secondary" type="submit" ' . SUBMITDISABLED . 'value="' . __( 'Delete Cache On All Blogs', 'wp-super-cache' ) . '" /></div>';
+				echo '<div class="submit"><input id="deleteallpost" class="button-secondary" type="submit" ' . SUBMITDISABLED . 'value="' . __( 'Delete Cache On All Blogs', 'wp-super-cache' ) . '" /></div>';
 				wp_nonce_field('wp-cache');
 				echo "</form><br />\n";
 			}
 			?>
 			<h3 class="clear"><?php _e( 'Recommended Links and Plugins', 'wp-super-cache' ); ?></h3>
 			<p><?php _e( 'Caching is only one part of making a website faster. Here are some other plugins that will help:', 'wp-super-cache' ); ?></p>
+			<ul style="list-style: square; margin-left: 2em;">
+			<li><?php printf( __( '<a href="%s">Jetpack</a> provides everything you need to build a successful WordPress website including an image/photo CDN (free) and a video hosting service (paid).', 'wp-super-cache' ), 'https://jetpack.com/redirect/?source=jitm-wpsc-recommended' ); ?></li>
 			<li><?php printf( __( '<a href="%s">Yahoo! Yslow</a> is an extension for the Firefox add-on Firebug. It analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. Also try the performance tools online at <a href="%s">GTMetrix</a>.', 'wp-super-cache' ), 'http://developer.yahoo.com/yslow/', 'http://gtmetrix.com/' ); ?></li>
 			<li><?php printf( __( '<a href="%s">Use Google Libraries</a> allows you to load some commonly used Javascript libraries from Google webservers. Ironically, it may reduce your Yslow score.', 'wp-super-cache' ), 'http://wordpress.org/plugins/use-google-libraries/' ); ?></li>
 			<li><?php printf( __( '<strong>Advanced users only:</strong> Install an object cache. Choose from <a href="%s">Memcached</a>, <a href="%s">XCache</a>, <a href="%s">eAcccelerator</a> and others.', 'wp-super-cache' ), 'http://wordpress.org/plugins/memcached/', 'http://neosmart.net/dl.php?id=12', 'http://neosmart.net/dl.php?id=13' ); ?></li>
 			<li><?php printf( __( '<a href="%s">Cron View</a> is a useful plugin to use when trying to debug garbage collection and preload problems.', 'wp-super-cache' ), 'http://wordpress.org/plugins/cron-view/' ); ?></li>
-			</ol>
+			</ul>
 
 			<?php
 		break;
@@ -1277,17 +1271,21 @@ table.wpsc-settings-table {
 	?>
 	</fieldset>
 	</td><td valign='top' style='width: 300px'>
-	<div style='background: #ffc; border: 1px solid #333; margin: 2px; padding: 5px'>
-	<h3 align='center'><?php _e( 'Need Help?', 'wp-super-cache' ); ?></h3>
+	<div style='background: #ffc; border: 1px solid #333; margin: 2px; padding: 3px 15px'>
+	<h3><?php _e( 'More Site Speed Tools', 'wp-super-cache' ); ?></h3>
+	<ul style="list-style: square; margin-left: 2em;">
+	<li><a href="https://jetpack.com/redirect/?source=jitm-wpsc-generic"><?php _e( 'Speed up images and photos (free)', 'wp-super-cache' ); ?></a></li>
+	<li><a href="https://jetpack.com/redirect/?source=jitm-wpsc-premium"><?php _e( 'Fast video hosting (paid)', 'wp-super-cache' ); ?></a></li>
+	</ul>
+	<h3><?php _e( 'Need Help?', 'wp-super-cache' ); ?></h3>
 	<ol>
-	<li><?php _e( 'Use the debug system in the Debug tab above. It will tell you what the plugin is doing.', 'wp-super-cache' ); ?></li>
-	<li><?php printf( __( '<a href="%1$s">Installation Help</a>', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/installation/' ); ?></li>
-	<li><?php printf( __( '<a href="%1$s">Frequently Asked Questions</a>', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/faq/' ); ?></li>
-	<li><?php printf( __( '<a href="%1$s">Support Forum</a>', 'wp-super-cache' ), 'http://wordpress.org/tags/wp-super-cache' ); ?></li>
-	<li><?php printf( __( '<a href="%1$s">Development Version</a>', 'wp-super-cache' ), 'http://ocaoimh.ie/y/2o' ); ?></li>
+	<li><?php printf( __( 'Use the <a href="%1$s">Debug tab</a> for diagnostics.', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache&tab=debug' ) ); ?></li>
+	<li><?php printf( __( 'Check out the <a href="%1$s">support forum</a> and <a href="%2$s">FAQ</a>.', 'wp-super-cache' ), 'https://wordpress.org/support/plugin/wp-super-cache', 'http://wordpress.org/plugins/wp-super-cache/#faq' ); ?></li>
+	<li><?php printf( __( 'Visit the <a href="%1$s">plugin homepage</a>.', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/' ); ?></li>
+	<li><?php printf( __( 'Try out the <a href="%1$s">development version</a> for the latest fixes (<a href="%2$s">changelog</a>).', 'wp-super-cache' ), 'https://odd.blog/y/2o', 'https://plugins.trac.wordpress.org/log/wp-super-cache/' ); ?></li>
 	</ol>
-	<h3 align='center'><?php _e( 'Rate This Plugin!', 'wp-super-cache' ); ?></h3>
-	<p><?php printf( __( 'Please <a href="%s">rate</a> this plugin and tell me if it works for you or not. It really helps development.', 'wp-super-cache' ), 'http://wordpress.org/plugins/wp-super-cache/' ); ?></p>
+	<h3><?php _e( 'Rate This Plugin', 'wp-super-cache' ); ?></h3>
+	<p><?php printf( __( 'Please <a href="%s">rate us</a> and give feedback.', 'wp-super-cache' ), 'https://wordpress.org/support/plugin/wp-super-cache/reviews?rate=5#new-post' ); ?></p>
 
 	<?php
 	if ( isset( $wp_supercache_cache_list ) && $wp_supercache_cache_list ) {
@@ -1361,66 +1359,32 @@ function wpsc_admin_tabs( $current = 0 ) {
 	if ( $wp_db_version >= 15477 ) {
 		echo '<div id="nav"><h2 class="themes-php">';
 		echo implode( "", $links );
-		echo '</h2></div>';
+		echo '</div></h2>';
 	} else {
 		echo implode( " | ", $links );
 	}
 }
 
 function wsc_mod_rewrite() {
-	global $cache_enabled, $super_cache_enabled, $valid_nonce, $cache_path, $wp_cache_mod_rewrite, $wpmu_version;
+	global $valid_nonce, $cache_path, $wp_cache_mod_rewrite;
 
 	if ( defined( 'WPSC_DISABLE_HTACCESS_UPDATE' ) )
 		return false;
 
 	if ( !$wp_cache_mod_rewrite )
 		return false;
-
-	if ( isset( $wpmu_version ) || function_exists( 'is_multisite' ) && is_multisite() ) {
-		if ( false == wpsupercache_site_admin() )
-			return false;
-		if ( function_exists( "is_main_site" ) && false == is_main_site() ) {
-			global $current_site;
-			$protocol = ( 'on' == strtolower( $_SERVER['HTTPS' ] ) ) ? 'https://' : 'http://';
-			if ( isset( $wpmu_version ) ) {
-				$link_to_admin = admin_url( "wpmu-admin.php?page=wpsupercache" );
-			} else {
-				$link_to_admin = admin_url( "ms-admin.php?page=wpsupercache" );
-			}
-			echo '<div id="message" class="updated fade"><p>' .  sprintf( __( 'Notice: WP Super Cache mod_rewrite rule checks disabled unless running on <a href="%s">the main site</a> of this network.', 'wp-super-cache' ), $link_to_admin ) . '</p></div>';
-			return false;
-		}
-	}
-
-	if ( function_exists( "is_main_site" ) && false == is_main_site() )
-		return true;
 	?>
 	<a name="modrewrite"></a><fieldset class="options">
-	<h3><?php _e( 'Mod Rewrite Rules', 'wp-super-cache' ); ?></h3><?php
+	<h3><?php _e( 'Mod Rewrite Rules', 'wp-super-cache' ); ?></h3>
+	<p><?php _e( 'When Expert cache delivery is enabled a file called <em>.htaccess</em> is modified. It should probably be in the same directory as your wp-config.php. This file has special rules that serve the cached files very quickly to visitors without ever executing PHP. The .htaccess file can be updated automatically, but if that fails, the rules will be displayed here and it can be edited by you. You will not need to update the rules unless a warning shows here.', 'wp-super-cache' ); ?></p>
 
-	extract( wpsc_get_htaccess_info() );
+	<?php
+	extract( wpsc_get_htaccess_info() ); // $document_root, $apache_root, $home_path, $home_root, $home_root_lc, $inst_root, $wprules, $scrules, $condition_rules, $rules, $gziprules
 	$dohtaccess = true;
-	global $wpmu_version;
-	if( isset( $wpmu_version ) ) {
-		echo "<h4 style='color: #a00'>" . __( 'WordPress MU Detected', 'wp-super-cache' ) . "</h4><p>" . __( "Unfortunately, the rewrite rules cannot be updated automatically when running WordPress MU. Please open your .htaccess and add the following mod_rewrite rules above any other rules in that file.", 'wp-super-cache' ) . "</p>";
-	} elseif( !$wprules || $wprules == '' ) {
-		echo "<h4 style='color: #a00'>" . __( 'Mod Rewrite rules cannot be updated!', 'wp-super-cache' ) . "</h4>";
-		echo "<p>" . sprintf( __( "You must have <strong>BEGIN</strong> and <strong>END</strong> markers in %s.htaccess for the auto update to work. They look like this and surround the main WordPress mod_rewrite rules:", 'wp-super-cache' ), $home_path );
-		echo "<blockquote><pre><em># BEGIN WordPress</em>\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteRule . /index.php [L]\n <em># END WordPress</em></pre></blockquote>";
-		_e( 'Refresh this page when you have updated your .htaccess file.', 'wp-super-cache' );
-		echo "</fieldset>";
-		$dohtaccess = false;
-	} elseif( strpos( $wprules, 'wordpressuser' ) ) { // Need to clear out old mod_rewrite rules
+	if( strpos( $wprules, 'wordpressuser' ) ) { // Need to clear out old mod_rewrite rules
 		echo "<p><strong>" . __( 'Thank you for upgrading.', 'wp-super-cache' ) . "</strong> " . sprintf( __( 'The mod_rewrite rules changed since you last installed this plugin. Unfortunately, you must remove the old supercache rules before the new ones are updated. Refresh this page when you have edited your .htaccess file. If you wish to manually upgrade, change the following line: %1$s so it looks like this: %2$s The only changes are "HTTP_COOKIE" becomes "HTTP:Cookie" and "wordpressuser" becomes "wordpress". This is a WordPress 2.5 change but it&#8217;s backwards compatible with older versions if you&#8217;re brave enough to use them.', 'wp-super-cache' ), '<blockquote><code>RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$</code></blockquote>', '<blockquote><code>RewriteCond %{HTTP:Cookie} !^.*wordpress.*$</code></blockquote>' ) . "</p>";
 		echo "</fieldset></div>";
 		return;
-	} elseif( $scrules != '' && strpos( $scrules, '%{REQUEST_URI} !^.*[^/]$' ) === false && substr( get_option( 'permalink_structure' ), -1 ) == '/' ) { // permalink structure has a trailing slash, need slash check in rules.
-		echo "<div style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><h4>" . __( 'Trailing slash check required.', 'wp-super-cache' ) . "</h4><p>" . __( 'It looks like your blog has URLs that end with a "/". Unfortunately since you installed this plugin a duplicate content bug has been found where URLs not ending in a "/" end serve the same content as those with the "/" and do not redirect to the proper URL. To fix, you must edit your .htaccess file and add these two rules to the two groups of Super Cache rules:', 'wp-super-cache' ) . "</p>";
-		echo "<blockquote><code>RewriteCond %{REQUEST_URI} !^.*[^/]$RewriteCond %{REQUEST_URI} !^.*//.*$</code></blockquote>";
-		echo "<p>" . __( 'You can see where the rules go and examine the complete rules by clicking the "View mod_rewrite rules" link below.', 'wp-super-cache' ) . "</p></div>";
-		$dohtaccess = false;
-	} elseif( strpos( $scrules, 'supercache' ) || strpos( $wprules, 'supercache' ) ) { // only write the rules once
-		$dohtaccess = false;
 	}
 	if ( $dohtaccess && !isset( $_POST[ 'updatehtaccess' ] ) ){
 		if ( $scrules == '' ) {
@@ -1429,14 +1393,15 @@ function wsc_mod_rewrite() {
 			wpsc_update_htaccess_form();
 		}
 	} elseif ( $valid_nonce && isset( $_POST[ 'updatehtaccess' ] ) ) {
-		echo "<div style='padding:0 8px;color:#4f8a10;background-color:#dff2bf;border:1px solid #4f8a10;'>";
-		if( wpsc_update_htaccess() ) {
+		if ( add_mod_rewrite_rules() ) {
 			echo "<h4>" . __( 'Mod Rewrite rules updated!', 'wp-super-cache' ) . "</h4>";
 			echo "<p><strong>" . sprintf( __( '%s.htaccess has been updated with the necessary mod_rewrite rules. Please verify they are correct. They should look like this:', 'wp-super-cache' ), $home_path ) . "</strong></p>\n";
 		} else {
+			global $update_mod_rewrite_rules_error;
 			echo "<h4>" . __( 'Mod Rewrite rules must be updated!', 'wp-super-cache' ) . "</h4>";
-			echo "<p><strong>" . sprintf( __( 'Your %s.htaccess is not writable by the webserver and must be updated with the necessary mod_rewrite rules. The new rules go above the regular WordPress rules as shown in the code below:', 'wp-super-cache' ), $home_path ) . "</strong></p>\n";
+			echo "<p>" . sprintf( __( 'The plugin could not update %1$s.htaccess file: %2$s.<br /> The new rules go above the regular WordPress rules as shown in the code below:', 'wp-super-cache' ), $home_path, "<strong>" . $update_mod_rewrite_rules_error . "</strong>" ) . "</p>\n";
 		}
+		echo "<div style='overflow: auto; width: 800px; height: 400px; padding:0 8px;color:#4f8a10;background-color:#dff2bf;border:1px solid #4f8a10;'>";
 		echo "<p><pre>" . esc_html( $rules ) . "</pre></p>\n</div>";
 	} else {
 		?>
@@ -1449,15 +1414,12 @@ function wsc_mod_rewrite() {
 		wpsc_update_htaccess_form();
 		echo "<div id='rewriterules' style='display: none;'>";
 		if ( $rules != $scrules )
-			echo '<div style="background: #fff; border: 1px solid #333; margin: 2px;">' . wp_text_diff( $scrules, $rules, array( 'title' => 'Rewrite Rules', 'title_left' => 'Current Rules', 'title_right' => 'New Rules' ) ) . "</div>";
+			echo '<div style="background: #fff; border: 1px solid #333; margin: 2px;">' . wp_text_diff( $scrules, $rules, array( 'title' => __( 'Rewrite Rules', 'wp-super-cache' ), 'title_left' => __( 'Current Rules', 'wp-super-cache' ), 'title_right' => __( 'New Rules', 'wp-super-cache' ) ) ) . "</div>";
 		echo "<p><pre># BEGIN WPSuperCache\n" . esc_html( $rules ) . "# END WPSuperCache</pre></p>\n";
 		echo "<p>" . sprintf( __( 'Rules must be added to %s too:', 'wp-super-cache' ), WP_CONTENT_DIR . "/cache/.htaccess" ) . "</p>";
 		echo "<pre># BEGIN supercache\n" . esc_html( $gziprules ) . "# END supercache</pre></p>";
 		echo '</div>';
 	}
-	// http://allmybrain.com/2007/11/08/making-wp-super-cache-gzip-compression-work/
-	$gziprules = insert_with_markers( $cache_path . '.htaccess', 'supercache', explode( "\n", $gziprules ) );
-	echo "<h4>" . sprintf( __( 'Gzip encoding rules in %s.htaccess created.', 'wp-super-cache' ), $cache_path ) . "</h4>";
 
 	?></fieldset><?php
 }
@@ -1479,99 +1441,83 @@ function comment_form_lockdown_message() {
 if( defined( 'WPLOCKDOWN' ) && constant( 'WPLOCKDOWN' ) )
 	add_action( 'comment_form', 'comment_form_lockdown_message' );
 
-function wp_lock_down() {
-	global $wpdb, $cache_path, $wp_cache_config_file, $valid_nonce, $cached_direct_pages, $cache_enabled, $super_cache_enabled;
-	global $wp_super_cache_lock_down;
+function wp_update_lock_down() {
+	global $cache_path, $wp_cache_config_file, $valid_nonce;
 
-	if(isset($_POST['wp_lock_down']) && $valid_nonce) {
-		$wp_lock_down = $_POST['wp_lock_down'] == '1' ? '1' : '0';
-		wp_cache_replace_line('^.*WPLOCKDOWN', "define( 'WPLOCKDOWN', '$wp_lock_down' );", $wp_cache_config_file);
-		if( $wp_lock_down == '0' && function_exists( 'prune_super_cache' ) )
+	if ( isset( $_POST[ 'wp_lock_down' ] ) && $valid_nonce ) {
+		$wp_lock_down = $_POST[ 'wp_lock_down' ] == '1' ? '1' : '0';
+		wp_cache_replace_line( '^.*WPLOCKDOWN', "if ( ! defined( 'WPLOCKDOWN' ) ) define( 'WPLOCKDOWN', '$wp_lock_down' );", $wp_cache_config_file );
+		if ( false == defined( 'WPLOCKDOWN' ) )
+			define( 'WPLOCKDOWN', $wp_lock_down );
+		if ( $wp_lock_down == '0' && function_exists( 'prune_super_cache' ) )
 			prune_super_cache( $cache_path, true ); // clear the cache after lockdown
-
-	}
-	if( !isset( $wp_lock_down ) ) {
-		if( defined( 'WPLOCKDOWN' ) ) {
-			$wp_lock_down = constant( 'WPLOCKDOWN' );
-		} else {
-			$wp_lock_down = '0';
-		}
-	}
-	?><a name='lockdown'></a>
-	<fieldset class="options">
-	<h3><?php _e( 'Lock Down:', 'wp-super-cache' ); ?> <?php echo $wp_lock_down == '0' ? '<span style="color:red">' . __( 'Disabled', 'wp-super-cache' ) . '</span>' : '<span style="color:green">' . __( 'Enabled', 'wp-super-cache' ) . '</span>'; ?></h3>
-	<p><?php _e( 'Prepare your server for an expected spike in traffic by enabling the lock down. When this is enabled, new comments on a post will not refresh the cached static files.', 'wp-super-cache' ); ?></p>
-	<p><?php _e( 'Developers: Make your plugin lock down compatible by checking the "WPLOCKDOWN" constant. The following code will make sure your plugin respects the WPLOCKDOWN setting.', 'wp-super-cache' ); ?>
-	<blockquote><code>if( defined( 'WPLOCKDOWN' ) && constant( 'WPLOCKDOWN' ) ) {
-		&nbsp;&nbsp;&nbsp;&nbsp;echo "<?php _e( 'Sorry. My blog is locked down. Updates will appear shortly', 'wp-super-cache' ); ?>";
-		}</code></blockquote>
-	<?php
-	if( $wp_lock_down == '1' ) {
-		?><p><?php _e( 'WordPress is locked down. Super Cache static files will not be deleted when new comments are made.', 'wp-super-cache' ); ?></p><?php
-	} else {
-		?><p><?php _e( 'WordPress is not locked down. New comments will refresh Super Cache static files as normal.', 'wp-super-cache' ); ?></p><?php
+		return $wp_lock_down;
 	}
-	$new_lockdown =  $wp_lock_down == '1' ? '0' : '1';
-	$new_lockdown_desc =  $wp_lock_down == '1' ? __( 'Disable', 'wp-super-cache' ) : __( 'Enable', 'wp-super-cache' );
-	echo '<form name="wp_lock_down" action="#lockdown" method="post">';
-	echo "<input type='hidden' name='wp_lock_down' value='{$new_lockdown}' />";
-	echo "<div class='submit'><input class='button-primary' type='submit' " . SUBMITDISABLED . " value='{$new_lockdown_desc} " . __( 'Lock Down', 'wp-super-cache' ) . "' /></div>";
-	wp_nonce_field('wp-cache');
-	echo "</form>\n";
+	if ( defined( 'WPLOCKDOWN' ) )
+		return constant( 'WPLOCKDOWN' );
+	else
+		return 0;
+}
 
-	?></fieldset><?php
-	if( $cache_enabled == true && $super_cache_enabled == true ) {
-		?><a name='direct'></a>
-	<fieldset class="options">
-	<h3><?php _e( 'Directly Cached Files', 'wp-super-cache' ); ?></h3><?php
+function wpsc_update_direct_pages() {
+	global $cached_direct_pages, $valid_nonce, $cache_path, $wp_cache_config_file;
 
+	if ( false == isset( $cached_direct_pages ) )
+		$cached_direct_pages = array();
 	$out = '';
-	if( $valid_nonce && array_key_exists('direct_pages', $_POST) && is_array( $_POST[ 'direct_pages' ] ) && !empty( $_POST[ 'direct_pages' ] ) ) {
+	if ( $valid_nonce && array_key_exists('direct_pages', $_POST) && is_array( $_POST[ 'direct_pages' ] ) && !empty( $_POST[ 'direct_pages' ] ) ) {
 		$expiredfiles = array_diff( $cached_direct_pages, $_POST[ 'direct_pages' ] );
 		unset( $cached_direct_pages );
 		foreach( $_POST[ 'direct_pages' ] as $page ) {
-			$page = esc_sql( $page );
-			if( $page != '' ) {
+			$page = str_replace( '..', '', preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $page ) );
+			if ( $page != '' ) {
 				$cached_direct_pages[] = $page;
 				$out .= "'$page', ";
 			}
 		}
-		if( $out == '' ) {
-			$out = "'', ";
-		}
+		if ( false == isset( $cached_direct_pages ) )
+			$cached_direct_pages = array();
 	}
-	if( $valid_nonce && array_key_exists('new_direct_page', $_POST) && $_POST[ 'new_direct_page' ] && '' != $_POST[ 'new_direct_page' ] ) {
+	if ( $valid_nonce && array_key_exists('new_direct_page', $_POST) && $_POST[ 'new_direct_page' ] && '' != $_POST[ 'new_direct_page' ] ) {
 		$page = str_replace( get_option( 'siteurl' ), '', $_POST[ 'new_direct_page' ] );
-		if( substr( $page, 0, 1 ) != '/' )
+		$page = str_replace( '..', '', preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $page ) );
+		if ( substr( $page, 0, 1 ) != '/' )
 			$page = '/' . $page;
-		$page = esc_sql( $page );
-		if ( false == is_array( $cached_direct_pages ) || in_array( $page, $cached_direct_pages ) == false ) {
+		if ( $page != '/' || false == is_array( $cached_direct_pages ) || in_array( $page, $cached_direct_pages ) == false ) {
 			$cached_direct_pages[] = $page;
 			$out .= "'$page', ";
+
+			@unlink( trailingslashit( ABSPATH . $page ) . "index.html" );
+			wpsc_delete_files( get_supercache_dir() . $page );
 		}
 	}
 
-	if( $out != '' ) {
+	if ( $out != '' ) {
 		$out = substr( $out, 0, -2 );
-		$out = '$cached_direct_pages = array( ' . $out . ' );';
-		wp_cache_replace_line('^ *\$cached_direct_pages', "$out", $wp_cache_config_file);
-		prune_super_cache( $cache_path, true );
 	}
+	if ( $out == "''" ) {
+		$out = '';
+	}
+	$out = '$cached_direct_pages = array( ' . $out . ' );';
+	wp_cache_replace_line('^ *\$cached_direct_pages', "$out", $wp_cache_config_file);
 
-	if( !empty( $expiredfiles ) ) {
+	if ( !empty( $expiredfiles ) ) {
 		foreach( $expiredfiles as $file ) {
 			if( $file != '' ) {
 				$firstfolder = explode( '/', $file );
 				$firstfolder = ABSPATH . $firstfolder[1];
 				$file = ABSPATH . $file;
-				@unlink( trailingslashit( $file ) . 'index.html' );
-				@unlink( trailingslashit( $file ) . 'index.html.gz' );
-				RecursiveFolderDelete( trailingslashit( $firstfolder ) );
+				$file = realpath( str_replace( '..', '', preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $file ) ) );
+				if ( $file ) {
+					@unlink( trailingslashit( $file ) . "index.html" );
+					@unlink( trailingslashit( $file ) . "index.html.gz" );
+					RecursiveFolderDelete( trailingslashit( $firstfolder ) );
+				}
 			}
 		}
 	}
 
-	if( $valid_nonce && array_key_exists('deletepage', $_POST) && $_POST[ 'deletepage' ] ) {
+	if ( $valid_nonce && array_key_exists('deletepage', $_POST) && $_POST[ 'deletepage' ] ) {
 		$page = str_replace( '..', '', preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $_POST['deletepage'] ) ) . '/';
 		$pagefile = realpath( ABSPATH . $page . 'index.html' );
 		if ( substr( $pagefile, 0, strlen( ABSPATH ) ) != ABSPATH || false == wp_cache_confirm_delete( ABSPATH . $page ) ) {
@@ -1584,11 +1530,47 @@ function wp_lock_down() {
 			@unlink( $pagefile );
 			@unlink( $pagefile . '.gz' );
 			RecursiveFolderDelete( $firstfolder );
-			echo "<strong>" . sprintf( __( '%s removed!', 'wp-super-cache' ), $pagefile ) . "</strong>";
-			prune_super_cache( $cache_path, true );
 		}
 	}
 
+	return $cached_direct_pages;
+}
+
+function wp_lock_down() {
+	global $cached_direct_pages, $cache_enabled, $super_cache_enabled;
+
+	$wp_lock_down = wp_update_lock_down();
+
+	?><a name='lockdown'></a>
+	<fieldset class="options">
+	<h3><?php _e( 'Lock Down:', 'wp-super-cache' ); ?> <?php echo $wp_lock_down == '0' ? '<span style="color:red">' . __( 'Disabled', 'wp-super-cache' ) . '</span>' : '<span style="color:green">' . __( 'Enabled', 'wp-super-cache' ) . '</span>'; ?></h3>
+	<p><?php _e( 'Prepare your server for an expected spike in traffic by enabling the lock down. When this is enabled, new comments on a post will not refresh the cached static files.', 'wp-super-cache' ); ?></p>
+	<p><?php _e( 'Developers: Make your plugin lock down compatible by checking the "WPLOCKDOWN" constant. The following code will make sure your plugin respects the WPLOCKDOWN setting.', 'wp-super-cache' ); ?>
+	<blockquote><code>if( defined( 'WPLOCKDOWN' ) && constant( 'WPLOCKDOWN' ) ) {
+		&nbsp;&nbsp;&nbsp;&nbsp;echo "<?php _e( 'Sorry. My blog is locked down. Updates will appear shortly', 'wp-super-cache' ); ?>";
+		}</code></blockquote>
+	<?php
+	if( $wp_lock_down == '1' ) {
+		?><p><?php _e( 'WordPress is locked down. Super Cache static files will not be deleted when new comments are made.', 'wp-super-cache' ); ?></p><?php
+	} else {
+		?><p><?php _e( 'WordPress is not locked down. New comments will refresh Super Cache static files as normal.', 'wp-super-cache' ); ?></p><?php
+	}
+	$new_lockdown =  $wp_lock_down == '1' ? '0' : '1';
+	$new_lockdown_desc =  $wp_lock_down == '1' ? __( 'Disable', 'wp-super-cache' ) : __( 'Enable', 'wp-super-cache' );
+	echo '<form name="wp_lock_down" action="#lockdown" method="post">';
+	echo "<input type='hidden' name='wp_lock_down' value='{$new_lockdown}' />";
+	echo "<div class='submit'><input class='button-primary' type='submit' " . SUBMITDISABLED . " value='{$new_lockdown_desc} " . __( 'Lock Down', 'wp-super-cache' ) . "' /></div>";
+	wp_nonce_field('wp-cache');
+	echo "</form>\n";
+
+	?></fieldset><?php
+	if( $cache_enabled == true && $super_cache_enabled == true ) {
+		?><a name='direct'></a>
+	<fieldset class="options">
+	<h3><?php _e( 'Directly Cached Files', 'wp-super-cache' ); ?></h3><?php
+
+	$cached_direct_pages = wpsc_update_direct_pages();
+
 	$readonly = '';
 	if( !is_writeable_ACLSafe( ABSPATH ) ) {
 		$readonly = 'READONLY';
@@ -1652,13 +1634,13 @@ function RecursiveFolderDelete ( $folderPath ) { // from http://www.php.net/manu
 	}
 }
 
-function wp_cache_edit_max_time () {
-	global $cache_max_time, $wp_cache_config_file, $valid_nonce, $cache_enabled, $super_cache_enabled, $cache_schedule_type, $cache_scheduled_time, $cache_schedule_interval, $cache_time_interval, $cache_gc_email_me, $wp_cache_preload_on;
-
-	$timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
-
+function wp_cache_time_update() {
+	global $cache_max_time, $wp_cache_config_file, $valid_nonce, $cache_schedule_type, $cache_scheduled_time, $cache_schedule_interval, $cache_time_interval, $cache_gc_email_me;
 	if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'expirytime' ) {
 
+		if ( false == $valid_nonce )
+			return false;
+
 		if( !isset( $cache_schedule_type ) ) {
 			$cache_schedule_type = 'interval';
 			wp_cache_replace_line('^ *\$cache_schedule_type', "\$cache_schedule_type = '$cache_schedule_type';", $wp_cache_config_file);
@@ -1679,7 +1661,7 @@ function wp_cache_edit_max_time () {
 			wp_cache_replace_line('^ *\$cache_time_interval', "\$cache_time_interval = '$cache_time_interval';", $wp_cache_config_file);
 		}
 
-		if ( isset( $_POST['wp_max_time'] ) && $valid_nonce ) {
+		if ( isset( $_POST['wp_max_time'] ) ) {
 			$cache_max_time = (int)$_POST['wp_max_time'];
 			wp_cache_replace_line('^ *\$cache_max_time', "\$cache_max_time = $cache_max_time;", $wp_cache_config_file);
 			// schedule gc watcher
@@ -1687,14 +1669,14 @@ function wp_cache_edit_max_time () {
 				wp_schedule_event( time()+600, 'hourly', 'wp_cache_gc_watcher' );
 		}
 
-		if ( isset( $_POST[ 'cache_gc_email_me' ] ) && $valid_nonce ) {
+		if ( isset( $_POST[ 'cache_gc_email_me' ] ) ) {
 			$cache_gc_email_me = 1;
 			wp_cache_replace_line('^ *\$cache_gc_email_me', "\$cache_gc_email_me = $cache_gc_email_me;", $wp_cache_config_file);
-		} elseif ( $valid_nonce ) {
+		} else {
 			$cache_gc_email_me = 0;
 			wp_cache_replace_line('^ *\$cache_gc_email_me', "\$cache_gc_email_me = $cache_gc_email_me;", $wp_cache_config_file);
 		}
-		if ( isset( $_POST[ 'cache_schedule_type' ] ) && $_POST[ 'cache_schedule_type' ] == 'interval' && isset( $_POST['cache_time_interval'] ) && $valid_nonce ) {
+		if ( isset( $_POST[ 'cache_schedule_type' ] ) && $_POST[ 'cache_schedule_type' ] == 'interval' && isset( $_POST['cache_time_interval'] ) ) {
 			wp_clear_scheduled_hook( 'wp_cache_gc' );
 			$cache_schedule_type = 'interval';
 			if ( (int)$_POST[ 'cache_time_interval' ] == 0 )
@@ -1703,7 +1685,7 @@ function wp_cache_edit_max_time () {
 			wp_schedule_single_event( time() + $cache_time_interval, 'wp_cache_gc' );
 			wp_cache_replace_line('^ *\$cache_schedule_type', "\$cache_schedule_type = '$cache_schedule_type';", $wp_cache_config_file);
 			wp_cache_replace_line('^ *\$cache_time_interval', "\$cache_time_interval = '$cache_time_interval';", $wp_cache_config_file);
-		} elseif ( $valid_nonce ) { // clock
+		} else { // clock
 			wp_clear_scheduled_hook( 'wp_cache_gc' );
 			$cache_schedule_type = 'time';
 			if ( !isset( $_POST[ 'cache_scheduled_time' ] ) ||
@@ -1716,7 +1698,7 @@ function wp_cache_edit_max_time () {
 			$schedules = wp_get_schedules();
 			if ( !isset( $cache_schedule_interval ) )
 				$cache_schedule_interval = 'daily';
-			if ( isset( $schedules[ $_POST[ 'cache_schedule_interval' ] ] ) )
+			if ( isset( $_POST[ 'cache_schedule_interval' ] ) && isset( $schedules[ $_POST[ 'cache_schedule_interval' ] ] ) )
 				$cache_schedule_interval = $_POST[ 'cache_schedule_interval' ];
 			wp_cache_replace_line('^ *\$cache_schedule_type', "\$cache_schedule_type = '$cache_schedule_type';", $wp_cache_config_file);
 			wp_cache_replace_line('^ *\$cache_schedule_interval', "\$cache_schedule_interval = '{$cache_schedule_interval}';", $wp_cache_config_file);
@@ -1725,14 +1707,23 @@ function wp_cache_edit_max_time () {
 		}
 	}
 
+}
+
+function wp_cache_edit_max_time() {
+	global $cache_max_time, $wp_cache_config_file, $valid_nonce, $super_cache_enabled, $cache_schedule_type, $cache_scheduled_time, $cache_schedule_interval, $cache_time_interval, $cache_gc_email_me, $wp_cache_preload_on;
+
+	$timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
+
+	wp_cache_time_update();
+
 	?><fieldset class="options">
 	<a name='expirytime'></a>
 	<h3><?php _e( 'Expiry Time &amp; Garbage Collection', 'wp-super-cache' ); ?></h3><?php
 
-	?><span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n($timezone_format, false, 'gmt')); ?></span><?php
+	?><span id="utc-time"><?php printf( __( '<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>', 'wp-super-cache' ), date_i18n( $timezone_format, false, 'gmt' ) ); ?></span><?php
 	$current_offset = get_option('gmt_offset');
 	if ( get_option('timezone_string') || !empty($current_offset) ) {
-		?><span id="local-time"><?php printf(__('Local time is <code>%1$s</code>'), date_i18n($timezone_format)); ?></span><?php
+		?><span id="local-time"><?php printf( __( 'Local time is <code>%1$s</code>', 'wp-super-cache' ), date_i18n( $timezone_format ) ); ?></span><?php
 	}
 	$next_gc = wp_next_scheduled( 'wp_cache_gc' );
 	if ( $next_gc )
@@ -1740,7 +1731,7 @@ function wp_cache_edit_max_time () {
 
 
 	if ( $wp_cache_preload_on )
-		echo "<p>" . __( 'Warning! <strong>PRELOAD MODE</strong> activated. Supercache files will not be deleted regardless of age.' ) . "</p>";
+		echo "<p>" . __( 'Warning! <strong>PRELOAD MODE</strong> activated. Supercache files will not be deleted regardless of age.', 'wp-super-cache' ) . "</p>";
 
 	echo "<script type='text/javascript'>";
 	echo "jQuery(function () {
@@ -1790,7 +1781,7 @@ function wp_cache_edit_max_time () {
 	echo "<li>" . __( 'Sites with lots of static content, no widgets or rss feeds in their sidebar can use a timeout of 86400 seconds or even more and set the timer to something equally long.', 'wp-super-cache' ) . "</li>\n";
 	echo "<li>" . __( 'Sites where an external data source updates at a particular time every day should set the timeout to 86400 seconds and use the Clock scheduler set appropriately.', 'wp-super-cache' ) . "</li>\n";
 	echo "</ol>";
-	echo "<p>" . __( 'Checking for and deleting expired files is expensive, but it&#8217;s expensive leaving them there too. On a very busy site, you should set the expiry time to <em>600 seconds</em>. Experiment with different values and visit this page to see how many expired files remain at different times during the day. If you are using legacy caching, aim to have less than 500 cached files if possible. You can have many times more cached files when using mod_rewrite or PHP caching.', 'wp-super-cache' ) . "</p>";
+	echo "<p>" . __( 'Checking for and deleting expired files is expensive, but it&#8217;s expensive leaving them there too. On a very busy site, you should set the expiry time to <em>600 seconds</em>. Experiment with different values and visit this page to see how many expired files remain at different times during the day.', 'wp-super-cache' ) . "</p>";
 	echo "<p>" . __( 'Set the expiry time to 0 seconds to disable garbage collection.', 'wp-super-cache' ) . "</p>";
 	echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . 'value="' . __( 'Change Expiration', 'wp-super-cache' ) . '" /></div>';
 	wp_nonce_field('wp-cache');
@@ -1821,7 +1812,7 @@ if( !function_exists('apache_request_headers') ) {
 	}
 }
 
-function wp_cache_edit_rejected_ua() {
+function wp_cache_update_rejected_ua() {
 	global $cache_rejected_user_agent, $wp_cache_config_file, $valid_nonce;
 
 	if ( !function_exists( 'apache_request_headers' ) ) return;
@@ -1835,6 +1826,14 @@ function wp_cache_edit_rejected_ua() {
 		}
 		reset( $cache_rejected_user_agent );
 	}
+}
+
+function wp_cache_edit_rejected_ua() {
+	global $cache_rejected_user_agent, $wp_cache_config_file, $valid_nonce;
+
+	if ( !function_exists( 'apache_request_headers' ) ) return;
+
+	wp_cache_update_rejected_ua();
 
 	echo '<a name="useragents"></a><fieldset class="options"><h3>' . __( 'Rejected User Agents', 'wp-super-cache' ) . '</h3>';
 	echo "<p>" . __( 'Strings in the HTTP &#8217;User Agent&#8217; header that prevent WP-Cache from caching bot, spiders, and crawlers&#8217; requests. Note that super cached files are still sent to these agents if they already exists.', 'wp-super-cache' ) . "</p>\n";
@@ -1850,7 +1849,7 @@ function wp_cache_edit_rejected_ua() {
 	echo "</fieldset>\n";
 }
 
-function wp_cache_edit_rejected_pages() {
+function wp_cache_update_rejected_pages() {
 	global $wp_cache_config_file, $valid_nonce, $wp_cache_pages;
 
 	if ( isset( $_POST[ 'wp_edit_rejected_pages' ] ) && $valid_nonce ) {
@@ -1865,6 +1864,12 @@ function wp_cache_edit_rejected_pages() {
 			$wp_cache_pages[ $page ] = $value;
 		}
 	}
+}
+
+function wp_cache_edit_rejected_pages() {
+	global $wp_cache_config_file, $valid_nonce, $wp_cache_pages;
+
+	wp_cache_update_rejected_pages();
 
 	echo '<a name="rejectpages"></a>';
 	echo '<p>' . __( 'Do not cache the following page types. See the <a href="http://codex.wordpress.org/Conditional_Tags">Conditional Tags</a> documentation for a complete discussion on each type.', 'wp-super-cache' ) . '</p>';
@@ -1881,20 +1886,26 @@ function wp_cache_edit_rejected_pages() {
 	echo '<label><input type="checkbox" value="1" name="wp_cache_pages[search]" ' . checked( 1, $wp_cache_pages[ 'search' ], false ) . ' /> ' . __( 'Search Pages', 'wp-super-cache' ) . ' (is_search)</label><br />';
 	echo '<label><input type="checkbox" value="1" name="wp_cache_pages[author]" ' . checked( 1, $wp_cache_pages[ 'author' ], false ) . ' /> ' . __( 'Author Pages', 'wp-super-cache' ) . ' (is_author)</label><br />';
 
-	echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . 'value="' . __( 'Save' ) . '" /></div>';
+	echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . 'value="' . __( 'Save', 'wp-super-cache' ) . '" /></div>';
 	wp_nonce_field('wp-cache');
 	echo "</form>\n";
 
 }
 
-function wp_cache_edit_rejected() {
-	global $cache_acceptable_files, $cache_rejected_uri, $wp_cache_config_file, $valid_nonce;
+function wp_cache_update_rejected_strings() {
+	global $cache_rejected_uri, $wp_cache_config_file, $valid_nonce;
 
-	if(isset($_REQUEST['wp_rejected_uri']) && $valid_nonce) {
+	if ( isset($_REQUEST['wp_rejected_uri']) && $valid_nonce ) {
 		$text = wp_cache_sanitize_value( str_replace( '\\\\', '\\', $_REQUEST['wp_rejected_uri'] ), $cache_rejected_uri );
 		wp_cache_replace_line('^ *\$cache_rejected_uri', "\$cache_rejected_uri = $text;", $wp_cache_config_file);
 	}
 
+}
+
+function wp_cache_edit_rejected() {
+	global $cache_rejected_uri;
+
+	wp_cache_update_rejected_strings();
 
 	echo '<a name="rejecturi"></a>';
 	echo '<form name="wp_edit_rejected" action="#rejecturi" method="post">';
@@ -1909,14 +1920,19 @@ function wp_cache_edit_rejected() {
 	echo "</form>\n";
 }
 
-function wp_cache_edit_accepted() {
-	global $cache_acceptable_files, $cache_rejected_uri, $wp_cache_config_file, $valid_nonce;
+function wp_cache_update_accepted_strings() {
+	global $cache_acceptable_files, $wp_cache_config_file, $valid_nonce;
 
-	if(isset($_REQUEST['wp_accepted_files']) && $valid_nonce) {
-		$text = wp_cache_sanitize_value($_REQUEST['wp_accepted_files'], $cache_acceptable_files);
-		wp_cache_replace_line('^ *\$cache_acceptable_files', "\$cache_acceptable_files = $text;", $wp_cache_config_file);
+	if ( isset( $_REQUEST[ 'wp_accepted_files' ] ) && $valid_nonce ) {
+		$text = wp_cache_sanitize_value( $_REQUEST[ 'wp_accepted_files' ], $cache_acceptable_files );
+		wp_cache_replace_line( '^ *\$cache_acceptable_files', "\$cache_acceptable_files = $text;", $wp_cache_config_file );
 	}
+}
+
+function wp_cache_edit_accepted() {
+	global $cache_acceptable_files;
 
+	wp_cache_update_accepted_strings();
 
 	echo '<a name="cancache"></a>';
 	echo '<div style="clear:both"></div><form name="wp_edit_accepted" action="#cancache" method="post">';
@@ -1931,54 +1947,148 @@ function wp_cache_edit_accepted() {
 	echo "</form>\n";
 }
 
-function wp_cache_debug_settings() {
+function wpsc_create_debug_log( $filename = '', $username = '' ) {
+	global $cache_path, $wp_cache_debug_username, $wp_cache_debug_log;
+	if ( $filename != '' ) {
+		$wp_cache_debug_log = $filename;
+	} else {
+		$wp_cache_debug_log = md5( time() + mt_rand() ) . ".php";
+	}
+	if ( $username != '' ) {
+		$wp_cache_debug_username = $username;
+	} else {
+		$wp_cache_debug_username = md5( time() + mt_rand() );
+	}
+
+	$fp = fopen( $cache_path . $wp_cache_debug_log, 'w' );
+	if ( $fp ) {
+		fwrite( $fp, '<' . "?php\n" );
+		$msg = '
+				if ( !isset( $_SERVER[ "PHP_AUTH_USER" ] ) || ( $_SERVER[ "PHP_AUTH_USER" ] != "' . $wp_cache_debug_username . '" && $_SERVER[ "PHP_AUTH_PW" ] != "' . $wp_cache_debug_username . '" ) ) {
+					header( "WWW-Authenticate: Basic realm=\"WP-Super-Cache Debug Log\"" );
+					header("HTTP/1.0 401 Unauthorized");
+					echo "You must login to view the debug log";
+					exit;
+				}';
+		fwrite( $fp, $msg );
+		fwrite( $fp, '?' . "><pre>" );
+		fclose( $fp );
+		wp_cache_setting( 'wp_cache_debug_log', $wp_cache_debug_log );
+		wp_cache_setting( 'wp_cache_debug_username', $wp_cache_debug_username );
+	}
+	return array( 'wp_cache_debug_log' => $wp_cache_debug_log, 'wp_cache_debug_username' => $wp_cache_debug_username );
+}
+
+function wpsc_update_debug_settings() {
 	global $wp_super_cache_debug, $wp_cache_debug_log, $wp_cache_debug_ip, $cache_path, $valid_nonce, $wp_cache_config_file, $wp_super_cache_comments;
 	global $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification, $wp_super_cache_advanced_debug;
-
-	if ( false == isset( $wp_super_cache_comments ) )
-		$wp_super_cache_comments = 1;
-	if ( isset( $_POST[ 'wp_cache_debug' ] ) && $valid_nonce ) {
-		if ( !isset( $_POST[ 'wp_super_cache_debug' ] ) )
-			$_POST[ 'wp_super_cache_debug' ] = 0;
-		$wp_super_cache_debug = intval( $_POST[ 'wp_super_cache_debug' ] );
-		wp_cache_replace_line('^ *\$wp_super_cache_debug', "\$wp_super_cache_debug = '$wp_super_cache_debug';", $wp_cache_config_file);
-		if ( $wp_super_cache_debug && ( ( isset( $wp_cache_debug_log ) && $wp_cache_debug_log == '' ) || !isset( $wp_cache_debug_log ) ) ) {
-			$wp_cache_debug_log = md5( time() ) . ".txt";
-		} else {
-			$wp_cache_debug_log = "";
-		}
-		wp_cache_replace_line('^ *\$wp_cache_debug_log', "\$wp_cache_debug_log = '$wp_cache_debug_log';", $wp_cache_config_file);
+	global $wp_cache_debug_username;
+
+	if ( false == $valid_nonce ) {
+		return array (
+			'wp_super_cache_debug' => $wp_super_cache_debug,
+			'wp_cache_debug_log' => $wp_cache_debug_log,
+			'wp_cache_debug_ip' => $wp_cache_debug_ip,
+			'wp_super_cache_comments' => $wp_super_cache_comments,
+			'wp_super_cache_front_page_check' => $wp_super_cache_front_page_check,
+			'wp_super_cache_front_page_clear' => $wp_super_cache_front_page_clear,
+			'wp_super_cache_front_page_text' => $wp_super_cache_front_page_text,
+			'wp_super_cache_front_page_notification' => $wp_super_cache_front_page_notification,
+			'wp_super_cache_advanced_debug' => $wp_super_cache_advanced_debug,
+			'wp_cache_debug_username' => $wp_cache_debug_username,
+		);
+	}
+
+	if ( isset( $_POST[ 'wpsc_delete_log' ] ) && $wp_cache_debug_log != '' ) {
+		@unlink( $cache_path . $wp_cache_debug_log );
+		extract( wpsc_create_debug_log( $wp_cache_debug_log, $wp_cache_debug_username ) ); // $wp_cache_debug_log, $wp_cache_debug_username
+	} elseif ( isset( $_POST[ 'wp_super_cache_debug' ] ) ) {
+		if ( ! isset( $wp_cache_debug_log ) || $wp_cache_debug_log == '' ) {
+			extract( wpsc_create_debug_log() ); // $wp_cache_debug_log, $wp_cache_debug_username
+		} elseif ( ! file_exists( $cache_path . $wp_cache_debug_log ) ) { // make sure debug log exists before toggling debugging
+			extract( wpsc_create_debug_log( $wp_cache_debug_log, $wp_cache_debug_username ) ); // $wp_cache_debug_log, $wp_cache_debug_username 
+		}
+		$wp_super_cache_debug = (int) $_POST[ 'wp_super_cache_debug' ];
+		wp_cache_setting( 'wp_super_cache_debug', $wp_super_cache_debug );
+	}
+
+	if ( isset( $_POST[ 'wp_cache_debug' ] ) ) {
+		wp_cache_setting( 'wp_cache_debug_username', $wp_cache_debug_username );
+		wp_cache_setting( 'wp_cache_debug_log', $wp_cache_debug_log );
 		$wp_super_cache_comments = isset( $_POST[ 'wp_super_cache_comments' ] ) ? 1 : 0;
-		wp_cache_replace_line('^ *\$wp_super_cache_comments', "\$wp_super_cache_comments = '$wp_super_cache_comments';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_super_cache_comments', $wp_super_cache_comments );
 		$wp_cache_debug_ip = esc_html( $_POST[ 'wp_cache_debug_ip' ] );
-		wp_cache_replace_line('^ *\$wp_cache_debug_ip', "\$wp_cache_debug_ip = '$wp_cache_debug_ip';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_cache_debug_ip', $wp_cache_debug_ip );
 		$wp_super_cache_front_page_check = isset( $_POST[ 'wp_super_cache_front_page_check' ] ) ? 1 : 0;
-		wp_cache_replace_line('^ *\$wp_super_cache_front_page_check', "\$wp_super_cache_front_page_check = '$wp_super_cache_front_page_check';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_super_cache_front_page_check', $wp_super_cache_front_page_check );
 		$wp_super_cache_front_page_clear = isset( $_POST[ 'wp_super_cache_front_page_clear' ] ) ? 1 : 0;
-		wp_cache_replace_line('^ *\$wp_super_cache_front_page_clear', "\$wp_super_cache_front_page_clear = '$wp_super_cache_front_page_clear';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_super_cache_front_page_clear', $wp_super_cache_front_page_clear );
 		$wp_super_cache_front_page_text = esc_html( $_POST[ 'wp_super_cache_front_page_text' ] );
-		wp_cache_replace_line('^ *\$wp_super_cache_front_page_text', "\$wp_super_cache_front_page_text = '$wp_super_cache_front_page_text';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_super_cache_front_page_text', $wp_super_cache_front_page_text );
 		$wp_super_cache_front_page_notification = isset( $_POST[ 'wp_super_cache_front_page_notification' ] ) ? 1 : 0;
-		wp_cache_replace_line('^ *\$wp_super_cache_front_page_notification', "\$wp_super_cache_front_page_notification = '$wp_super_cache_front_page_notification';", $wp_cache_config_file);
+		wp_cache_setting( 'wp_super_cache_front_page_notification', $wp_super_cache_front_page_notification );
 		if ( $wp_super_cache_front_page_check == 1 && !wp_next_scheduled( 'wp_cache_check_site_hook' ) ) {
 			wp_schedule_single_event( time() + 360 , 'wp_cache_check_site_hook' );
-			wp_cache_debug( 'scheduled wp_cache_check_site_hook for 360 seconds time.', 2 );
+			wp_cache_debug( 'scheduled wp_cache_check_site_hook for 360 seconds time.' );
 		}
 	}
 
+	return array (
+		'wp_super_cache_debug' => $wp_super_cache_debug,
+		'wp_cache_debug_log' => $wp_cache_debug_log,
+		'wp_cache_debug_ip' => $wp_cache_debug_ip,
+		'wp_super_cache_comments' => $wp_super_cache_comments,
+		'wp_super_cache_front_page_check' => $wp_super_cache_front_page_check,
+		'wp_super_cache_front_page_clear' => $wp_super_cache_front_page_clear,
+		'wp_super_cache_front_page_text' => $wp_super_cache_front_page_text,
+		'wp_super_cache_front_page_notification' => $wp_super_cache_front_page_notification,
+		'wp_super_cache_advanced_debug' => $wp_super_cache_advanced_debug,
+		'wp_cache_debug_username' => $wp_cache_debug_username,
+	);
+}
+
+function wp_cache_debug_settings() {
+	global $wp_super_cache_debug, $wp_cache_debug_log, $wp_cache_debug_ip, $cache_path, $valid_nonce, $wp_cache_config_file, $wp_super_cache_comments;
+	global $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification, $wp_super_cache_advanced_debug;
+	global $wp_cache_debug_username;
+
+	extract( wpsc_update_debug_settings() ); // $wp_super_cache_debug, $wp_cache_debug_log, $wp_cache_debug_ip, $wp_super_cache_comments, $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification, $wp_super_cache_advanced_debug, $wp_cache_debug_username
+
 	echo '<a name="debug"></a>';
 	echo '<fieldset class="options">';
-	if ( isset( $wp_cache_debug_log ) && $wp_cache_debug_log != '' )
-		echo "<p>" . sprintf( __( 'Currently logging to: %s', 'wp-super-cache' ), "<a href='" . site_url( str_replace( ABSPATH, '', "{$cache_path}{$wp_cache_debug_log}" ) ) . "'>$cache_path{$wp_cache_debug_log}</a>" ) . "</p>";
-
+	echo '<p>' . __( 'Fix problems with the plugin by debugging it here. It will log to a file in your cache directory.', 'wp-super-cache' ) . '</p>';
+	if ( ! isset( $wp_cache_debug_log ) || $wp_cache_debug_log == '' ) {
+		extract( wpsc_create_debug_log() ); // $wp_cache_debug_log, $wp_cache_debug_username
+	}
+	$log_file_link = "<a href='" . site_url( str_replace( ABSPATH, '', "{$cache_path}{$wp_cache_debug_log}" ) ) . "'>$wp_cache_debug_log</a>";
+	if ( $wp_super_cache_debug == 1 ) {
+		echo "<p>" . sprintf( __( 'Currently logging to: %s', 'wp-super-cache' ), $log_file_link ) . "</p>";
+	} else {
+		echo "<p>" . sprintf( __( 'Last Logged to: %s', 'wp-super-cache' ), $log_file_link ) . "</p>";
+	}
+	echo "<p>" . sprintf( __( 'Username/Password: %s', 'wp-super-cache' ), $wp_cache_debug_username ) . "</p>";
 
-	echo '<p>' . __( 'Fix problems with the plugin by debugging it here. It can log them to a file in your cache directory.', 'wp-super-cache' ) . '</p>';
-	echo '<div style="clear:both"></div><form name="wp_cache_debug" action="" method="post">';
+	echo '<form name="wpsc_delete" action="" method="post">';
+	wp_nonce_field('wp-cache');
+	submit_button( __( 'Delete', 'wp-super-cache' ), 'delete', 'wpsc_delete_log', false );
+	echo "</form>";
+	echo '<form name="wpsc_delete" action="" method="post">';
+	if ( ! isset( $wp_super_cache_debug ) || $wp_super_cache_debug == 0 ) {
+		$debug_status_message = __( 'Enable Logging', 'wp-super-cache' );
+		$not_status = 1;
+	} else {
+		$debug_status_message = __( 'Disable Logging', 'wp-super-cache' );
+		$not_status = 0;
+	}
+	echo "<input type='hidden' name='wp_super_cache_debug' value='" . $not_status . "' />";
+	wp_nonce_field('wp-cache');
+	submit_button( $debug_status_message, 'primary', 'wpsc_log_status', true );
+	echo "</form>";
+	echo '<form name="wp_cache_debug" action="" method="post">';
 	echo "<input type='hidden' name='wp_cache_debug' value='1' /><br />";
 	echo "<table class='form-table'>";
-	echo "<tr><td>" . __( 'Debugging', 'wp-super-cache' ) . "</td><td><input type='checkbox' name='wp_super_cache_debug' value='1' " . checked( 1, $wp_super_cache_debug, false ) . " /> " . __( 'enabled', 'wp-super-cache' ) . "</td></tr>";
-	echo "<tr><td>" . __( 'IP Address', 'wp-super-cache' ) . "</td><td> <input type='text' size='20' name='wp_cache_debug_ip' value='{$wp_cache_debug_ip}' /> " . sprintf( __( '(only log requests from this IP address. Your IP is %s)', 'wp-super-cache' ), $_SERVER[ 'REMOTE_ADDR' ] ) . "</td></tr>";
-	echo "<tr><td valign='top'>" . __( 'Cache Status Messages', 'wp-super-cache' ) . "</td><td><input type='checkbox' name='wp_super_cache_comments' value='1' " . checked( 1, $wp_super_cache_comments, false ) . " /> " . __( 'enabled', 'wp-super-cache' ) . "<br />";
+	echo "<tr><th>" . __( 'IP Address', 'wp-super-cache' ) . "</th><td> <input type='text' size='20' name='wp_cache_debug_ip' value='{$wp_cache_debug_ip}' /> " . sprintf( __( '(only log requests from this IP address. Your IP is %s)', 'wp-super-cache' ), $_SERVER[ 'REMOTE_ADDR' ] ) . "</td></tr>";
+	echo "<tr><th valign='top'>" . __( 'Cache Status Messages', 'wp-super-cache' ) . "</th><td><input type='checkbox' name='wp_super_cache_comments' value='1' " . checked( 1, $wp_super_cache_comments, false ) . " /> " . __( 'enabled', 'wp-super-cache' ) . "<br />";
 	echo  __( 'Display comments at the end of every page like this:', 'wp-super-cache' ) . "<br />";
 	echo "<pre>&lt;!-- Dynamic page generated in 0.450 seconds. -->
 &lt;!-- Cached page generated by WP-Super-Cache on " . date( "Y-m-d H:i:s", time() ) . " -->
@@ -2002,16 +2112,19 @@ function wp_cache_debug_settings() {
 }
 
 function wp_cache_enable() {
-	global $wp_cache_config_file, $cache_enabled, $supercachedir;
+	global $wp_cache_config_file, $cache_enabled;
 
-	if(get_option('gzipcompression')) {
-		echo "<strong>" . __( 'Error: GZIP compression is enabled. Disable it if you want to enable wp-cache.', 'wp-super-cache' ) . "</strong>";
-		return false;
-	}
 	if( wp_cache_replace_line('^ *\$cache_enabled', '$cache_enabled = true;', $wp_cache_config_file) ) {
 		$cache_enabled = true;
 	}
-	wp_super_cache_enable();
+
+	if ( wpsc_set_default_gc() ) {
+		// gc might not be scheduled, check and schedule
+		$timestamp = wp_next_scheduled( 'wp_cache_gc' );
+		if ( false == $timestamp ) {
+			wp_schedule_single_event( time() + 600, 'wp_cache_gc' );
+		}
+	}
 }
 
 function wp_cache_disable() {
@@ -2066,6 +2179,20 @@ function wp_cache_is_enabled() {
 	return false;
 }
 
+function wp_cache_setting( $field, $value ) {
+	global $wp_cache_config_file;
+	global ${$field};
+	$$field = $value;
+	if ( is_numeric( $value ) ) {
+		wp_cache_replace_line( '^ *\$' . $field, "\$$field = $value;", $wp_cache_config_file );
+	} elseif ( is_object( $value ) || is_array( $value ) ) {
+		$text = var_export( $value, true );
+		$text = preg_replace( '/[\s]+/', ' ', $text );
+		wp_cache_replace_line( '^ *\$' . $field, "\$$field = $text;", $wp_cache_config_file );
+	} else {
+		wp_cache_replace_line( '^ *\$' . $field, "\$$field = '$value';", $wp_cache_config_file );
+	}
+}
 
 function wp_cache_replace_line($old, $new, $my_file) {
 	if ( @is_file( $my_file ) == false ) {
@@ -2087,9 +2214,9 @@ function wp_cache_replace_line($old, $new, $my_file) {
 	if ($found) {
 		$fd = fopen($my_file, 'w');
 		foreach( (array)$lines as $line ) {
-			if ( !preg_match("/$old/", $line))
+			if ( !preg_match( "/$old/", $line ) ) {
 				fputs($fd, $line);
-			else {
+			} elseif ( $new != '' ) {
 				fputs($fd, "$new //Added by WP-Cache Manager\n");
 			}
 		}
@@ -2113,6 +2240,11 @@ function wp_cache_replace_line($old, $new, $my_file) {
 
 function wp_cache_remove_index() {
 	global $cache_path;
+
+	if ( null === $cache_path || '' === $cache_path ) {
+		return;
+	}
+
 	@unlink( $cache_path . "index.html" );
 	@unlink( $cache_path . "supercache/index.html" );
 	@unlink( $cache_path . "blogs/index.html" );
@@ -2138,7 +2270,7 @@ function wp_cache_remove_index() {
 }
 
 function wp_cache_index_notice() {
-	global $current_user, $wp_version, $wp_cache_not_logged_in, $cache_path;
+	global $wp_version, $cache_path;
 
 	if ( false == wpsupercache_site_admin() )
 		return false;
@@ -2159,7 +2291,7 @@ function wp_cache_index_notice() {
 	} elseif ( get_site_option( 'wp_super_cache_index_detected' ) != 3 ) {
 		echo "<div id='wpsc-index-warning' class='error notice' style='padding: 10px 10px 50px 10px'>";
 		echo "<h1>" . __( 'WP Super Cache Warning!', 'wp-super-cache' ) . '</h1>';
-		echo '<p>' . __( 'Your server is configured to show files and directories, which may expose sensitive data such as login cookies to attackers in the cache directories. That has been fixed by adding a file named index.html to each directory. If you use PHP or legacy caching, consider moving the location of the cache directory on the Advanced Settings page.', 'wp-super-cache' ) . '</p>';
+		echo '<p>' . __( 'Your server is configured to show files and directories, which may expose sensitive data such as login cookies to attackers in the cache directories. That has been fixed by adding a file named index.html to each directory. If you use simple caching, consider moving the location of the cache directory on the Advanced Settings page.', 'wp-super-cache' ) . '</p>';
 		echo "<p><strong>";
 		_e( 'If you just installed WP Super Cache for the first time, you can dismiss this message. Otherwise, you should probably refresh the login cookies of all logged in WordPress users here by clicking the logout link below.', 'wp-super-cache' );
 		echo "</strong></p>";
@@ -2212,7 +2344,7 @@ if ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'wpsclogout' )
    add_action( 'admin_init', 'wp_cache_logout_all' );
 
 function wp_cache_add_index_protection() {
-	global $cache_path, $blog_cache_dir, $blogcacheid;
+	global $cache_path, $blog_cache_dir;
 
 	if ( is_dir( $cache_path ) && false == is_file( "$cache_path/index.html" ) ) {
 		$page = wp_remote_get( home_url( "/wp-content/cache/" ) );
@@ -2269,7 +2401,7 @@ function wp_cache_add_site_cache_index() {
 }
 
 function wp_cache_verify_cache_dir() {
-	global $cache_path, $blog_cache_dir, $blogcacheid;
+	global $cache_path, $blog_cache_dir;
 
 	$dir = dirname($cache_path);
 	if ( !file_exists($cache_path) ) {
@@ -2340,7 +2472,10 @@ function wp_cache_verify_config_file() {
 		$sem_id = crc32( $WPSC_HTTP_HOST . $cache_path ) & 0x7fffffff;
 		wp_cache_replace_line('sem_id', '$sem_id = ' . $sem_id . ';', $wp_cache_config_file);
 	}
-	require($wp_cache_config_file);
+	if ( $new ) {
+		require($wp_cache_config_file);
+		wpsc_set_default_gc( true );
+	}
 	return true;
 }
 
@@ -2354,8 +2489,8 @@ function wp_cache_create_advanced_cache() {
 
 	$line = 'define( \'WPCACHEHOME\', \'' . dirname( __FILE__ ) . '/\' );';
 	if ( !is_writeable_ACLSafe($global_config_file) || !wp_cache_replace_line('define *\( *\'WPCACHEHOME\'', $line, $global_config_file ) ) {
-			echo '<div id="message" class="updated fade"><h3>' . __( 'Warning', 'wp-super-cache' ) . "! <em>" . sprintf( __( 'Could not update %s!</em> WPCACHEHOME must be set in config file.', 'wp-super-cache' ), $global_config_file ) . "</h3>";
-			return false;
+		echo '<div class="notice notice-error"><h3>' . __( 'Warning', 'wp-super-cache' ) . "! <em>" . sprintf( __( 'Could not update %s!</em> WPCACHEHOME must be set in config file.', 'wp-super-cache' ), $global_config_file ) . "</h3></div>";
+		return false;
 	}
 	$ret = true;
 
@@ -2390,12 +2525,13 @@ function wp_cache_check_link() {
 	}
 
 	if( false == $ret ) {
-		echo '<div id="message" class="updated fade"><h3>' . __( 'Warning', 'wp-super-cache' ) . "! <em>" . sprintf( __( '%s/advanced-cache.php</em> does not exist or cannot be updated.', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</h3>";
-		echo "<p><ul><li>" . __( '1. If it already exists, please delete the file first.', 'wp-super-cache' ) . "</li>";
-		echo "<li>" . sprintf( __( '2. Make %1$s writable using the chmod command through your ftp or server software. (<em>chmod 777 %1$s</em>) and refresh this page. This is only a temporary measure and you&#8217;ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</li>";
-		echo "<li>" . sprintf( __( '3. Refresh this page to update <em>%s/advanced-cache.php</em>', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</li></ul>";
+		echo '<div class="notice notice-error"><h3>' . __( 'Warning', 'wp-super-cache' ) . "! <em>" . sprintf( __( '%s/advanced-cache.php</em> does not exist or cannot be updated.', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</h3>";
+		echo "<p><ol><li>" . __( 'If it already exists, please delete the file first.', 'wp-super-cache' ) . "</li>";
+		echo "<li>" . sprintf( __( 'Make %1$s writable using the chmod command through your ftp or server software. (<em>chmod 777 %1$s</em>) and refresh this page. This is only a temporary measure and you&#8217;ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</li>";
+		echo "<li>" . sprintf( __( 'Refresh this page to update <em>%s/advanced-cache.php</em>', 'wp-super-cache' ), WP_CONTENT_DIR ) . "</li></ol>";
 		echo sprintf( __( 'If that doesn&#8217;t work, make sure the file <em>%s/advanced-cache.php</em> doesn&#8217;t exist:', 'wp-super-cache' ), WP_CONTENT_DIR ) . "<ol>";
-		printf( __( '<li>1. Open <em>%1$s$wp_cache_file</em> in a text editor.</li><li>2. Change the text <em>CACHEHOME</em> to <em>%2$s</em></li><li>3. Save the file and copy it to <em>%3$s</em> and refresh this page.</li>', 'wp-super-cache' ), $wp_cache_file, WPCACHEHOME, $wp_cache_link );
+		printf( __( '<li>Open <em>%1$s</em> in a text editor.</li><li>Change the text <em>CACHEHOME</em> to <em>%2$s</em></li><li> Save the file and copy it to <em>%3$s</em> and refresh this page.</li>', 'wp-super-cache' ), $wp_cache_file, WPCACHEHOME, $wp_cache_link );
+		echo "</ol>";
 		echo "</div>";
 		return false;
 	}
@@ -2418,20 +2554,86 @@ function wp_cache_check_global_config() {
 	$line = 'define(\'WP_CACHE\', true);';
 	if (!is_writeable_ACLSafe($global) || !wp_cache_replace_line('define *\( *\'WP_CACHE\'', $line, $global) ) {
 		if ( defined( 'WP_CACHE' ) && constant( 'WP_CACHE' ) == false ) {
-			echo '<div id="message" class="updated fade">' . __( "<h3>WP_CACHE constant set to false</h3><p>The WP_CACHE constant is used by WordPress to load the code that serves cached pages. Unfortunately, it is set to false. Please edit your wp-config.php and add or edit the following line above the final require_once command:<br /><br /><code>define('WP_CACHE', true);</code></p>", 'wp-super-cache' ) . "</div>";
+			echo '<div class="notice notice-error">' . __( "<h3>WP_CACHE constant set to false</h3><p>The WP_CACHE constant is used by WordPress to load the code that serves cached pages. Unfortunately, it is set to false. Please edit your wp-config.php and add or edit the following line above the final require_once command:<br /><br /><code>define('WP_CACHE', true);</code></p>", 'wp-super-cache' ) . "</div>";
 		} else {
-			echo "<p>" . __( "<strong>Error: WP_CACHE is not enabled</strong> in your <code>wp-config.php</code> file and I couldn&#8217;t modify it.", 'wp-super-cache' ) . "</p>";;
-			echo "<p>" . sprintf( __( "Edit <code>%s</code> and add the following line:<br /> <code>define('WP_CACHE', true);</code><br />Otherwise, <strong>WP-Cache will not be executed</strong> by WordPress core. ", 'wp-super-cache' ), $global ) . "</p>";
+			echo '<div class="notice notice-error"><p>' . __( "<strong>Error: WP_CACHE is not enabled</strong> in your <code>wp-config.php</code> file and I couldn&#8217;t modify it.", 'wp-super-cache' ) . "</p>";
+			echo "<p>" . sprintf( __( "Edit <code>%s</code> and add the following line:<br /> <code>define('WP_CACHE', true);</code><br />Otherwise, <strong>WP-Cache will not be executed</strong> by WordPress core. ", 'wp-super-cache' ), $global ) . "</p></div>";
 		}
 		return false;
 	}  else {
-		echo "<div style='border: 1px solid #333; background: #ffffaa; padding: 2px;'>" . __( '<h3>WP_CACHE constant added to wp-config.php</h3><p>If you continue to see this warning message please see point 5 of the <a href="http://wordpress.org/plugins/wp-super-cache/faq/">Troubleshooting Guide</a>. The WP_CACHE line must be moved up.', 'wp-super-cache' ) . "</p></div>";
+		echo "<div class='notice notice-warning'>" . __( '<h3>WP_CACHE constant added to wp-config.php</h3><p>If you continue to see this warning message please see point 5 of the <a href="http://wordpress.org/plugins/wp-super-cache/faq/">Troubleshooting Guide</a>. The WP_CACHE line must be moved up.', 'wp-super-cache' ) . "</p></div>";
 	}
 	return true;
 }
 
+function wpsc_generate_sizes_array() {
+	$sizes = array();
+	$cache_types  = apply_filters( 'wpsc_cache_types', array( 'supercache', 'wpcache' ) );
+	$cache_states = apply_filters( 'wpsc_cache_state', array( 'expired', 'cached' ) );
+	foreach( $cache_types as $type ) {
+		reset( $cache_states );
+		foreach( $cache_states as $state ) {
+			$sizes[ $type ][ $state ] = 0;
+		}
+		$sizes[ $type ][ 'fsize' ] = 0;
+		$sizes[ $type ][ 'cached_list' ] = array();
+		$sizes[ $type ][ 'expired_list' ] = array();
+	}
+	return $sizes;
+}
+
+function wp_cache_format_fsize( $fsize ) {
+	if ( $fsize > 1024 ) {
+		$fsize = number_format( $fsize / 1024, 2 ) . "MB";
+	} elseif ( $fsize != 0 ) {
+		$fsize = number_format( $fsize, 2 ) . "KB";
+	} else {
+		$fsize = "0KB";
+	}
+	return $fsize;
+}
+
+function wp_cache_regenerate_cache_file_stats() {
+	global $cache_compression, $supercachedir, $file_prefix, $wp_cache_preload_on, $cache_max_time;
+
+	if ( $supercachedir == '' )
+		$supercachedir = get_supercache_dir();
+
+	$sizes = wpsc_generate_sizes_array();
+	$now = time();
+	if (is_dir( $supercachedir ) ) {
+		if ( $dh = opendir( $supercachedir ) ) {
+			while ( ( $entry = readdir( $dh ) ) !== false ) {
+				if ( $entry != '.' && $entry != '..' ) {
+					$sizes = wpsc_dirsize( trailingslashit( $supercachedir ) . $entry, $sizes );
+				}
+			}
+			closedir( $dh );
+		}
+	}
+	foreach( $sizes as $cache_type => $list ) {
+		foreach( array( 'cached_list', 'expired_list' ) as $status ) {
+			$cached_list = array();
+			foreach( $list[ $status ] as $dir => $details ) {
+				if ( $details[ 'files' ] == 2 && !isset( $details[ 'upper_age' ] ) ) {
+					$details[ 'files' ] = 1;
+				}
+				$cached_list[ $dir ] = $details;
+			}
+			$sizes[ $cache_type ][ $status ] = $cached_list;
+		}
+	}
+	if ( $cache_compression ) {
+		$sizes[ 'supercache' ][ 'cached' ]  = intval( $sizes[ 'supercache' ][ 'cached' ] / 2 );
+		$sizes[ 'supercache' ][ 'expired' ] = intval( $sizes[ 'supercache' ][ 'expired' ] / 2 );
+	}
+	$cache_stats = array( 'generated' => time(), 'supercache' => $sizes[ 'supercache' ], 'wpcache' => $sizes[ 'wpcache' ] );
+	update_option( 'supercache_stats', $cache_stats );
+	return $cache_stats;
+}
+
 function wp_cache_files() {
-	global $cache_path, $file_prefix, $cache_max_time, $valid_nonce, $supercachedir, $cache_enabled, $super_cache_enabled, $blog_cache_dir, $cache_compression;
+	global $cache_path, $file_prefix, $cache_max_time, $valid_nonce, $supercachedir, $super_cache_enabled, $blog_cache_dir, $cache_compression;
 	global $wp_cache_object_cache, $wp_cache_preload_on;
 
 	if ( '/' != substr($cache_path, -1)) {
@@ -2464,7 +2666,6 @@ function wp_cache_files() {
 
 	$cache_stats = get_option( 'supercache_stats' );
 	if ( !is_array( $cache_stats ) || ( isset( $_GET[ 'listfiles' ] ) ) || ( $valid_nonce && array_key_exists('action', $_GET) && $_GET[ 'action' ] == 'regenerate_cache_stats' ) ) {
-	$list_files = false; // it doesn't list supercached files, and removing single pages is buggy
 	$count = 0;
 	$expired = 0;
 	$now = time();
@@ -2481,10 +2682,11 @@ function wp_cache_files() {
 			$supercacheuri = trailingslashit( realpath( $cache_path . 'supercache/' . $supercacheuri ) );
 			if ( wp_cache_confirm_delete( $supercacheuri ) ) {
 				printf( __( "Deleting supercache file: <strong>%s</strong><br />", 'wp-super-cache' ), $supercacheuri );
-				@unlink( $supercacheuri . 'index.html' );
-				@unlink( $supercacheuri . 'index.html.gz' );
+				wpsc_delete_files( $supercacheuri );
 				prune_super_cache( $supercacheuri . 'page', true );
 				@rmdir( $supercacheuri );
+			} else {
+				wp_die( __( 'Warning! You are not allowed to delete that file', 'wp-super-cache' ) );
 			}
 		}
 		while( false !== ( $file = readdir( $handle ) ) ) {
@@ -2523,7 +2725,6 @@ function wp_cache_files() {
 					$count++;
 				}
 				$wp_cache_fsize += $fsize;
-				$fsize = intval($fsize/1024);
 			}
 		}
 		closedir($handle);
@@ -2540,34 +2741,7 @@ function wp_cache_files() {
 	} else {
 		$wp_cache_fsize = '0KB';
 	}
-
-	// Supercache files
-	$now = time();
-	$sizes = array( 'expired' => 0, 'expired_list' => array(), 'cached' => 0, 'cached_list' => array(), 'ts' => 0 );
-
-	if (is_dir($supercachedir)) {
-		if( $dh = opendir( $supercachedir ) ) {
-			while( ( $entry = readdir( $dh ) ) !== false ) {
-				if ($entry != '.' && $entry != '..') {
-					$sizes = wpsc_dirsize( trailingslashit( $supercachedir ) . $entry, $sizes );
-				}
-			}
-			closedir($dh);
-		}
-	} else {
-		$filem = @filemtime( $supercachedir );
-		if ( false == $wp_cache_preload_on && is_file( $supercachedir ) && $cache_max_time > 0 && $filem + $cache_max_time <= $now ) {
-			$sizes[ 'expired' ] ++;
-			if ( $valid_nonce && isset( $_GET[ 'listfiles' ] ) )
-				$sizes[ 'expired_list' ][ str_replace( $cache_path . 'supercache/' , '', $supercachedir ) ] = $now - $filem;
-		} else {
-			if ( $valid_nonce && isset( $_GET[ 'listfiles' ] ) && $filem )
-				$sizes[ 'cached_list' ][ str_replace( $cache_path . 'supercache/' , '', $supercachedir ) ] = $now - $filem;
-		}
-	}
-	$sizes[ 'ts' ] = time();
-	$cache_stats = array( 'generated' => time(), 'supercache' => $sizes, 'wpcache' => array( 'cached' => $count, 'expired' => $expired, 'fsize' => $wp_cache_fsize ) );
-	update_option( 'supercache_stats', $cache_stats );
+	$cache_stats = wp_cache_regenerate_cache_file_stats();
 	} else {
 		echo "<p>" . __( 'Cache stats are not automatically generated. You must click the link below to regenerate the stats on this page.', 'wp-super-cache' ) . "</p>";
 		echo "<a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'tab' => 'contents', 'action' => 'regenerate_cache_stats' ) ), 'wp-cache' ) . "'>" . __( 'Regenerate cache stats', 'wp-super-cache' ) . "</a>";
@@ -2578,103 +2752,62 @@ function wp_cache_files() {
 	}// regerate stats cache
 
 	if ( is_array( $cache_stats ) ) {
-		echo "<p><strong>" . __( 'WP-Cache', 'wp-super-cache' ) . " ({$cache_stats[ 'wpcache' ][ 'fsize' ]})</strong></p>";
+		$fsize = wp_cache_format_fsize( $cache_stats[ 'wpcache' ][ 'fsize' ] / 1024 );
+		echo "<p><strong>" . __( 'WP-Cache', 'wp-super-cache' ) . " ({$fsize})</strong></p>";
 		echo "<ul><li>" . sprintf( __( '%s Cached Pages', 'wp-super-cache' ), $cache_stats[ 'wpcache' ][ 'cached' ] ) . "</li>";
 		echo "<li>" . sprintf( __( '%s Expired Pages', 'wp-super-cache' ),    $cache_stats[ 'wpcache' ][ 'expired' ] ) . "</li></ul>";
-		$divisor = $cache_compression == 1 ? 2 : 1;
 		if ( array_key_exists('fsize', (array)$cache_stats[ 'supercache' ]) )
 			$fsize = $cache_stats[ 'supercache' ][ 'fsize' ] / 1024;
 		else
 			$fsize = 0;
-		if( $fsize > 1024 ) {
-			$fsize = number_format( $fsize / 1024, 2 ) . "MB";
-		} elseif( $fsize != 0 ) {
-			$fsize = number_format( $fsize, 2 ) . "KB";
-		} else {
-			$fsize = "0KB";
-		}
+		$fsize = wp_cache_format_fsize( $fsize );
 		echo "<p><strong>" . __( 'WP-Super-Cache', 'wp-super-cache' ) . " ({$fsize})</strong></p>";
-		echo "<ul><li>" . sprintf( __( '%s Cached Pages', 'wp-super-cache' ), intval( $cache_stats[ 'supercache' ][ 'cached' ] / $divisor ) ) . "</li>";
-		if (isset($now) && isset($sizes))
-			$age = intval(($now - $sizes['ts'])/60);
+		echo "<ul><li>" . sprintf( __( '%s Cached Pages', 'wp-super-cache' ), $cache_stats[ 'supercache' ][ 'cached' ] ) . "</li>";
+		if ( isset( $now ) && isset( $cache_stats ) )
+			$age = intval( ( $now - $cache_stats['generated'] ) / 60 );
 		else
 			$age = 0;
-		echo "<li>" . sprintf( __( '%s Expired Pages', 'wp-super-cache' ), intval( $cache_stats[ 'supercache' ][ 'expired' ] / $divisor ) ) . "</li></ul>";
+		echo "<li>" . sprintf( __( '%s Expired Pages', 'wp-super-cache' ), $cache_stats[ 'supercache' ][ 'expired' ] ) . "</li></ul>";
 		if ( $valid_nonce && array_key_exists('listfiles', $_GET) && $_GET[ 'listfiles' ] ) {
 			echo "<div style='padding: 10px; border: 1px solid #333; height: 400px; width: 90%; overflow: auto'>";
-			if ( isset( $cached_list ) && is_array( $cached_list ) && !empty( $cached_list ) ) {
-				echo "<h4>" . __( 'Fresh WP-Cached Files', 'wp-super-cache' ) . "</h4>";
-				echo "<table class='widefat'><tr><th>#</th><th>" . __( 'URI', 'wp-super-cache' ) . "</th><th>" . __( 'Key', 'wp-super-cache' ) . "</th><th>" . __( 'Age', 'wp-super-cache' ) . "</th><th>" . __( 'Delete', 'wp-super-cache' ) . "</th></tr>";
-				$c = 1;
-				$flip = 1;
-				ksort( $cached_list );
-				foreach( $cached_list as $age => $d ) {
-					foreach( $d as $details ) {
-						$bg = $flip ? 'style="background: #EAEAEA;"' : '';
-						echo "<tr $bg><td>$c</td><td> <a href='http://{$details[ 'uri' ]}'>" . $details[ 'uri' ] . "</a></td><td> " . str_replace( $details[ 'uri' ], '', $details[ 'key' ] ) . "</td><td> {$age}</td><td><a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'action' => 'deletewpcache', 'uri' => base64_encode( $details[ 'uri' ] ) ) ), 'wp-cache' ) . "#listfiles'>X</a></td></tr>\n";
-						$flip = !$flip;
-						$c++;
-					}
-				}
-				echo "</table>";
-			}
-			if ( isset( $expired_list ) && is_array( $expired_list ) && !empty( $expired_list ) ) {
-				echo "<h4>" . __( 'Stale WP-Cached Files', 'wp-super-cache' ) . "</h4>";
-				echo "<table class='widefat'><tr><th>#</th><th>" . __( 'URI', 'wp-super-cache' ) . "</th><th>" . __( 'Key', 'wp-super-cache' ) . "</th><th>" . __( 'Age', 'wp-super-cache' ) . "</th><th>" . __( 'Delete', 'wp-super-cache' ) . "</th></tr>";
-				$c = 1;
-				$flip = 1;
-				ksort( $expired_list );
-				foreach( $expired_list as $age => $d ) {
-					foreach( $d as $details ) {
-						$bg = $flip ? 'style="background: #EAEAEA;"' : '';
-						echo "<tr $bg><td>$c</td><td> <a href='http://{$details[ 'uri' ]}'>" . $details[ 'uri' ] . "</a></td><td> " . str_replace( $details[ 'uri' ], '', $details[ 'key' ] ) . "</td><td> {$age}</td><td><a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'action' => 'deletewpcache', 'uri' => base64_encode( $details[ 'uri' ] ) ) ), 'wp-cache' ) . "#listfiles'>X</a></td></tr>\n";
-						$flip = !$flip;
-						$c++;
-					}
-				}
-				echo "</table>";
-			}
-			if ( is_array( $sizes[ 'cached_list' ] ) & !empty( $sizes[ 'cached_list' ] ) ) {
-				echo "<h4>" . __( 'Fresh Super Cached Files', 'wp-super-cache' ) . "</h4>";
-				echo "<table class='widefat'><tr><th>#</th><th>" . __( 'URI', 'wp-super-cache' ) . "</th><th>" . __( 'Age', 'wp-super-cache' ) . "</th><th>" . __( 'Delete', 'wp-super-cache' ) . "</th></tr>";
-				$c = 1;
-				$flip = 1;
-				ksort( $sizes[ 'cached_list' ] );
-				foreach( $sizes[ 'cached_list' ] as $age => $d ) {
-					foreach( $d as $uri => $n ) {
-						$bg = $flip ? 'style="background: #EAEAEA;"' : '';
-						echo "<tr $bg><td>$c</td><td> <a href='http://{$uri}'>" . $uri . "</a></td><td>$age</td><td><a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'action' => 'deletesupercache', 'uri' => base64_encode( $uri ) ) ), 'wp-cache' ) . "#listfiles'>X</a></td></tr>\n";
-						$flip = !$flip;
-						$c++;
-					}
-				}
-				echo "</table>";
-			}
-			if ( is_array( $sizes[ 'expired_list' ] ) && !empty( $sizes[ 'expired_list' ] ) ) {
-				echo "<h4>" . __( 'Stale Super Cached Files', 'wp-super-cache' ) . "</h4>";
-				echo "<table class='widefat'><tr><th>#</th><th>" . __( 'URI', 'wp-super-cache' ) . "</th><th>" . __( 'Age', 'wp-super-cache' ) . "</th><th>" . __( 'Delete', 'wp-super-cache' ) . "</th></tr>";
-				$c = 1;
-				$flip = 1;
-				ksort( $sizes[ 'expired_list' ] );
-				foreach( $sizes[ 'expired_list' ] as $age => $d ) {
-					foreach( $d as $uri => $n ) {
-						$bg = $flip ? 'style="background: #EAEAEA;"' : '';
-						echo "<tr $bg><td>$c</td><td> <a href='http://{$uri}'>" . $uri . "</a></td><td>$age</td><td><a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'action' => 'deletesupercache', 'uri' => base64_encode( $uri ) ) ), 'wp-cache' ) . "#listfiles'>X</a></td></tr>\n";
-						$flip = !$flip;
-						$c++;
+			$cache_description = array( 'supercache' => __( 'Super Cached Files', 'wp-super-cache' ), 'wpcache' => __( 'Full Cache Files', 'wp-super-cache' ) );
+			foreach( $cache_stats as $type => $details ) {
+				if ( is_array( $details ) == false )
+					continue;
+				foreach( array( 'cached_list' => 'Fresh', 'expired_list' => 'Stale' ) as $list => $description ) {
+					if ( is_array( $details[ $list ] ) & !empty( $details[ $list ] ) ) {
+						echo "<h4>" . sprintf( __( '%s %s Files', 'wp-super-cache' ), $description, $cache_description[ $type ] ) . "</h4>";
+						echo "<table class='widefat'><tr><th>#</th><th>" . __( 'URI', 'wp-super-cache' ) . "</th><th>" . __( 'Files', 'wp-super-cache' ) . "</th><th>" . __( 'Age', 'wp-super-cache' ) . "</th><th>" . __( 'Delete', 'wp-super-cache' ) . "</th></tr>";
+						$c = 1;
+						$flip = 1;
+
+						ksort( $details[ $list ] );
+						foreach( $details[ $list ] as $directory => $d ) {
+							if ( isset( $d[ 'upper_age' ] ) ) {
+								$age = "{$d[ 'lower_age' ]} - {$d[ 'upper_age' ]}";
+							} else {
+								$age = $d[ 'lower_age' ];
+							}
+							$bg = $flip ? 'style="background: #EAEAEA;"' : '';
+							echo "<tr $bg><td>$c</td><td> <a href='http://{$directory}'>{$directory}</a></td><td>{$d[ 'files' ]}</td><td>{$age}</td><td><a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'action' => 'deletesupercache', 'uri' => base64_encode( $directory ) ) ), 'wp-cache' ) . "#listfiles'>X</a></td></tr>\n";
+							$flip = !$flip;
+							$c++;
+						}
+						echo "</table>";
 					}
 				}
-				echo "</table>";
 			}
 			echo "</div>";
 			echo "<p><a href='?page=wpsupercache&tab=contents#top'>" . __( 'Hide file list', 'wp-super-cache' ) . "</a></p>";
-		} elseif ( $cache_stats[ 'supercache' ][ 'cached' ] > 500 || $cache_stats[ 'supercache' ][ 'expired' ] > 500 || ( $cache_stats[ 'wpcache' ][ 'cached' ] / $divisor ) > 500 || ( $cache_stats[ 'wpcache' ][ 'expired' ] / $divisor) > 500 ) {
+		} elseif ( $cache_stats[ 'supercache' ][ 'cached' ] > 500 || $cache_stats[ 'supercache' ][ 'expired' ] > 500 || $cache_stats[ 'wpcache' ][ 'cached' ] > 500 || $cache_stats[ 'wpcache' ][ 'expired' ] > 500 ) {
 			echo "<p><em>" . __( 'Too many cached files, no listing possible.', 'wp-super-cache' ) . "</em></p>";
 		} else {
 			echo "<p><a href='" . wp_nonce_url( add_query_arg( array( 'page' => 'wpsupercache', 'listfiles' => '1' ) ), 'wp-cache' ) . "#listfiles'>" . __( 'List all cached files', 'wp-super-cache' ) . "</a></p>";
 		}
 		if ( $cache_max_time > 0 )
 			echo "<p>" . sprintf( __( 'Expired files are files older than %s seconds. They are still used by the plugin and are deleted periodically.', 'wp-super-cache' ), $cache_max_time ) . "</p>";
+		if ( $wp_cache_preload_on )
+			echo "<p>" . __( 'Preload mode is enabled. Supercache files will never be expired.', 'wp-super-cache' ) . "</p>";
 	} // cache_stats
 	wp_cache_delete_buttons();
 
@@ -2715,7 +2848,7 @@ function delete_cache_dashboard() {
 add_action( 'dashmenu', 'delete_cache_dashboard' );
 
 function wpsc_dirsize($directory, $sizes) {
-	global $cache_max_time, $cache_path, $valid_nonce, $wp_cache_preload_on;
+	global $cache_max_time, $cache_path, $valid_nonce, $wp_cache_preload_on, $file_prefix;
 	$now = time();
 
 	if (is_dir($directory)) {
@@ -2728,28 +2861,55 @@ function wpsc_dirsize($directory, $sizes) {
 			closedir($dh);
 		}
 	} else {
-		if(is_file($directory) ) {
+		if ( is_file( $directory ) && strpos( $directory, 'meta-' . $file_prefix ) === false ) {
+			if ( strpos( $directory, '/' . $file_prefix ) !== false ) {
+				$cache_type = 'wpcache';
+			} else {
+				$cache_type = 'supercache';
+			}
+			$keep_fresh = false;
+			if ( $cache_type == 'supercache' && $wp_cache_preload_on )
+				$keep_fresh = true;
 			$filem = filemtime( $directory );
-			if ( $wp_cache_preload_on == false && $cache_max_time > 0 && $filem + $cache_max_time <= $now ) {
-				$sizes[ 'expired' ]+=1;
-				if ( $valid_nonce && $_GET[ 'listfiles' ] )
-					$sizes[ 'expired_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1;
+			if ( $keep_fresh == false && $cache_max_time > 0 && $filem + $cache_max_time <= $now ) {
+				$cache_status = 'expired';
 			} else {
-				$sizes[ 'cached' ]+=1;
-				if ( $valid_nonce && array_key_exists('listfiles', $_GET) && $_GET[ 'listfiles' ] )
-					$sizes[ 'cached_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1;
+				$cache_status = 'cached';
+			}
+			$sizes[ $cache_type ][ $cache_status ]+=1;
+			if ( $valid_nonce && isset( $_GET[ 'listfiles' ] ) ) {
+				$dir = str_replace( $cache_path . 'supercache/' , '', dirname( $directory ) );
+				$age = $now - $filem;
+				if ( false == isset( $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ] ) ) {
+					$sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'lower_age' ] = $age;
+					$sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'files' ] = 1;
+				} else {
+					$sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'files' ] += 1;
+					if ( $age <= $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'lower_age' ] ) {
+
+						if ( $age < $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'lower_age' ] && !isset( $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'upper_age' ] ) )
+							$sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'upper_age' ] = $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'lower_age' ];
+
+						$sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'lower_age' ] = $age;
+
+					} elseif ( !isset( $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'upper_age' ] ) || $age > $sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'upper_age' ] ) {
+
+						$sizes[ $cache_type ][ $cache_status . '_list' ][ $dir ][ 'upper_age' ] = $age;
+
+					}
+				}
 			}
 			if ( ! isset( $sizes[ 'fsize' ] ) )
-				$sizes[ 'fsize' ] = @filesize( $directory );
+				$sizes[ $cache_type ][ 'fsize' ] = @filesize( $directory );
 			else
-				$sizes[ 'fsize' ] += @filesize( $directory );
+				$sizes[ $cache_type ][ 'fsize' ] += @filesize( $directory );
 		}
 	}
 	return $sizes;
 }
 
 function wp_cache_clean_cache( $file_prefix, $all = false ) {
-	global $wpdb, $cache_path, $supercachedir, $blog_cache_dir, $wp_cache_object_cache;
+	global $cache_path, $supercachedir, $blog_cache_dir, $wp_cache_object_cache;
 
 	if ( $wp_cache_object_cache && function_exists( "reset_oc_version" ) )
 		reset_oc_version();
@@ -2758,6 +2918,8 @@ function wp_cache_clean_cache( $file_prefix, $all = false ) {
 		prune_super_cache( $cache_path, true );
 		return true;
 	}
+	if ( $supercachedir == '' )
+		$supercachedir = get_supercache_dir();
 
 	if (function_exists ('prune_super_cache')) {
 		if( is_dir( $supercachedir ) ) {
@@ -2775,6 +2937,30 @@ function wp_cache_clean_cache( $file_prefix, $all = false ) {
 
 }
 
+function wpsc_delete_url_cache( $url ) {
+	$dir = str_replace( get_option( 'home' ), '', $url );
+	if ( $dir != '' ) {
+		$supercachedir = get_supercache_dir();
+		wpsc_delete_files( $supercachedir . $dir );
+		prune_super_cache( $supercachedir . $dir . '/page', true );
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function wpsc_delete_post_cache( $id ) {
+	$post = get_post( $id );
+	wpsc_delete_url_cache( get_author_posts_url( $post->post_author ) );
+	$permalink = get_permalink( $id );
+	if ( $permalink != '' ) {
+		wpsc_delete_url_cache( $permalink );
+		return true;
+	} else {
+		return false;
+	}
+}
+
 function wp_cache_clean_legacy_files( $dir, $file_prefix ) {
 	global $wpdb;
 
@@ -2790,7 +2976,7 @@ function wp_cache_clean_legacy_files( $dir, $file_prefix ) {
 
 			if ( strpos( $file, $file_prefix ) !== false ) {
 				if ( strpos( $file, '.html' ) ) {
-					// delete old legacy files immediately
+					// delete old WPCache files immediately
 					@unlink( $dir . $file);
 					@unlink( $dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
 				} else {
@@ -2807,7 +2993,7 @@ function wp_cache_clean_legacy_files( $dir, $file_prefix ) {
 }
 
 function wp_cache_clean_expired($file_prefix) {
-	global $cache_path, $cache_max_time, $blog_cache_dir, $wp_cache_preload_on;
+	global $cache_max_time, $blog_cache_dir, $wp_cache_preload_on;
 
 	if ( $cache_max_time == 0 ) {
 		return false;
@@ -2853,7 +3039,6 @@ function wpsc_remove_marker( $filename, $marker ) {
 		}
 
 		$f = fopen( $filename, 'w' );
-		$foundit = false;
 		if ( $markerdata ) {
 			$state = true;
 			foreach ( $markerdata as $n => $markerline ) {
@@ -2877,7 +3062,7 @@ function wpsc_remove_marker( $filename, $marker ) {
 }
 
 function wp_super_cache_footer() {
-	?><p id='supercache'><?php printf( __( '%1$s is Stephen Fry proof thanks to caching by %2$s', 'wp-super-cache' ), bloginfo( 'name' ), '<a href="http://ocaoimh.ie/wp-super-cache/">WP Super Cache</a>' ); ?></p><?php
+	?><p id='supercache'><?php printf( __( '%1$s is Stephen Fry proof thanks to caching by %2$s', 'wp-super-cache' ), get_bloginfo( 'name', 'display' ), '<a href="https://odd.blog/wp-super-cache/">WP Super Cache</a>' ); ?></p><?php
 }
 if( isset( $wp_cache_hello_world ) && $wp_cache_hello_world )
 	add_action( 'wp_footer', 'wp_super_cache_footer' );
@@ -2910,13 +3095,13 @@ add_filter( 'favorite_actions', 'wp_cache_favorite_action' );
 function wp_cache_plugin_notice( $plugin ) {
 	global $cache_enabled;
  	if( $plugin == 'wp-super-cache/wp-cache.php' && !$cache_enabled && function_exists( "admin_url" ) )
-		echo '<td colspan="5" class="plugin-update">' . sprintf( __( 'WP Super Cache must be configured. Go to <a href="%s">the admin page</a> to enable and configure the plugin.' ), admin_url( 'options-general.php?page=wpsupercache' ) ) . '</td>';
+		echo '<td colspan="5" class="plugin-update">' . sprintf( __( 'WP Super Cache must be configured. Go to <a href="%s">the admin page</a> to enable and configure the plugin.', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ) ) . '</td>';
 }
 add_action( 'after_plugin_row', 'wp_cache_plugin_notice' );
 
 function wp_cache_plugin_actions( $links, $file ) {
  	if( $file == 'wp-super-cache/wp-cache.php' && function_exists( "admin_url" ) ) {
-		$settings_link = '<a href="' . admin_url( 'options-general.php?page=wpsupercache' ) . '">' . __('Settings') . '</a>';
+		$settings_link = '<a href="' . admin_url( 'options-general.php?page=wpsupercache' ) . '">' . __( 'Settings', 'wp-super-cache' ) . '</a>';
 		array_unshift( $links, $settings_link ); // before other links
 	}
 	return $links;
@@ -2926,10 +3111,10 @@ add_filter( 'plugin_action_links', 'wp_cache_plugin_actions', 10, 2 );
 function wp_cache_admin_notice() {
 	global $cache_enabled, $wp_cache_phase1_loaded;
 	if( substr( $_SERVER["PHP_SELF"], -11 ) == 'plugins.php' && !$cache_enabled && function_exists( "admin_url" ) )
-		echo '<div class="error"><p><strong>' . sprintf( __('WP Super Cache is disabled. Please go to the <a href="%s">plugin admin page</a> to enable caching.', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ) ) . '</strong></p></div>';
+		echo '<div class="notice notice-info"><p><strong>' . sprintf( __('WP Super Cache is disabled. Please go to the <a href="%s">plugin admin page</a> to enable caching.', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ) ) . '</strong></p></div>';
 
 	if ( defined( 'WP_CACHE' ) && WP_CACHE == true && ( defined( 'ADVANCEDCACHEPROBLEM' ) || ( $cache_enabled && false == isset( $wp_cache_phase1_loaded ) ) ) ) {
-		echo '<div class="error"><p>' . sprintf( __( 'Warning! WP Super Cache caching <strong>was</strong> broken but has been <strong>fixed</strong>! The script advanced-cache.php could not load wp-cache-phase1.php.<br /><br />The file %1$s/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.', 'wp-super-cache' ), WP_CONTENT_DIR ) . '</p></div>';
+		echo '<div class="notice notice-error"><p>' . sprintf( __( 'Warning! WP Super Cache caching <strong>was</strong> broken but has been <strong>fixed</strong>! The script advanced-cache.php could not load wp-cache-phase1.php.<br /><br />The file %1$s/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.', 'wp-super-cache' ), WP_CONTENT_DIR ) . '</p></div>';
 		wp_cache_create_advanced_cache();
 	}
 }
@@ -2980,14 +3165,8 @@ add_action( 'wp_cache_check_site_hook', 'wp_cache_check_site' );
 
 function update_cached_mobile_ua_list( $mobile_browsers, $mobile_prefixes = 0, $mobile_groups = 0 ) {
 	global $wp_cache_config_file, $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes, $wp_cache_mobile_groups;
-	if ( is_array( $mobile_browsers ) ) {
-		$wp_cache_mobile_browsers = $mobile_browsers;
-		wp_cache_replace_line('^ *\$wp_cache_mobile_browsers', "\$wp_cache_mobile_browsers = '" . implode( ', ', $mobile_browsers ) . "';", $wp_cache_config_file);
-	}
-	if ( is_array( $mobile_prefixes ) ) {
-		$wp_cache_mobile_prefixes = $mobile_prefixes;
-		wp_cache_replace_line('^ *\$wp_cache_mobile_prefixes', "\$wp_cache_mobile_prefixes = '" . implode( ', ', $mobile_prefixes ) . "';", $wp_cache_config_file);
-	}
+	wp_cache_setting( 'wp_cache_mobile_browsers', $mobile_browsers );
+	wp_cache_setting( 'wp_cache_mobile_prefixes', $mobile_prefixes );
 	if ( is_array( $mobile_groups ) ) {
 		$wp_cache_mobile_groups = $mobile_groups;
 		wp_cache_replace_line('^ *\$wp_cache_mobile_groups', "\$wp_cache_mobile_groups = '" . implode( ', ', $mobile_groups ) . "';", $wp_cache_config_file);
@@ -2997,7 +3176,7 @@ function update_cached_mobile_ua_list( $mobile_browsers, $mobile_prefixes = 0, $
 }
 
 function wpsc_update_htaccess() {
-	extract( wpsc_get_htaccess_info() );
+	extract( wpsc_get_htaccess_info() ); // $document_root, $apache_root, $home_path, $home_root, $home_root_lc, $inst_root, $wprules, $scrules, $condition_rules, $rules, $gziprules
 	wpsc_remove_marker( $home_path.'.htaccess', 'WordPress' ); // remove original WP rules so SuperCache rules go on top
 	if( insert_with_markers( $home_path.'.htaccess', 'WPSuperCache', explode( "\n", $rules ) ) && insert_with_markers( $home_path.'.htaccess', 'WordPress', explode( "\n", $wprules ) ) ) {
 		return true;
@@ -3009,25 +3188,29 @@ function wpsc_update_htaccess() {
 function wpsc_update_htaccess_form( $short_form = true ) {
 	global $wpmu_version;
 
-	extract( wpsc_get_htaccess_info() );
+	extract( wpsc_get_htaccess_info() ); // $document_root, $apache_root, $home_path, $home_root, $home_root_lc, $inst_root, $wprules, $scrules, $condition_rules, $rules, $gziprules
 	if( !is_writeable_ACLSafe( $home_path . ".htaccess" ) ) {
 		echo "<div style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><h4>" . __( 'Cannot update .htaccess', 'wp-super-cache' ) . "</h4><p>" . sprintf( __( 'The file <code>%s.htaccess</code> cannot be modified by the web server. Please correct this using the chmod command or your ftp client.', 'wp-super-cache' ), $home_path ) . "</p><p>" . __( 'Refresh this page when the file permissions have been modified.' ) . "</p><p>" . sprintf( __( 'Alternatively, you can edit your <code>%s.htaccess</code> file manually and add the following code (before any WordPress rules):', 'wp-super-cache' ), $home_path ) . "</p>";
 		echo "<p><pre># BEGIN WPSuperCache\n" . esc_html( $rules ) . "# END WPSuperCache</pre></p></div>";
 	} else {
 		if ( $short_form == false ) {
-			echo "<div style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><p>" . sprintf( __( 'To serve static html files your server must have the correct mod_rewrite rules added to a file called <code>%s.htaccess</code>', 'wp-super-cache' ), $home_path ) . " ";
+			echo "<p>" . sprintf( __( 'To serve static html files your server must have the correct mod_rewrite rules added to a file called <code>%s.htaccess</code>', 'wp-super-cache' ), $home_path ) . " ";
 			_e( "You can edit the file yourself. Add the following rules.", 'wp-super-cache' );
 			echo __( " Make sure they appear before any existing WordPress rules. ", 'wp-super-cache' ) . "</p>";
+			echo "<div style='overflow: auto; width: 800px; height: 400px; padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'>";
 			echo "<pre># BEGIN WPSuperCache\n" . esc_html( $rules ) . "# END WPSuperCache</pre></p>";
-			echo "<p>" . sprintf( __( 'Rules must be added to %s too:', 'wp-super-cache' ), WP_CONTENT_DIR . "/cache/.htaccess" ) . "</p>";
+			echo "</div>";
+			echo "<h4>" . sprintf( __( 'Rules must be added to %s too:', 'wp-super-cache' ), WP_CONTENT_DIR . "/cache/.htaccess" ) . "</h4>";
+			echo "<div style='overflow: auto; width: 800px; height: 400px; padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'>";
 			echo "<pre># BEGIN supercache\n" . esc_html( $gziprules ) . "# END supercache</pre></p>";
+			echo "</div>";
 		}
 		if ( !isset( $wpmu_version ) || $wpmu_version == '' ) {
 			echo '<form name="updatehtaccess" action="#modrewrite" method="post">';
 			echo '<input type="hidden" name="updatehtaccess" value="1" />';
 			echo '<div class="submit"><input class="button-primary" type="submit" ' . SUBMITDISABLED . 'id="updatehtaccess" value="' . __( 'Update Mod_Rewrite Rules', 'wp-super-cache' ) . '" /></div>';
 			wp_nonce_field('wp-cache');
-			echo "</form></div>\n";
+			echo "</form>\n";
 		}
 	}
 }
@@ -3072,7 +3255,21 @@ function wpsc_get_htaccess_info() {
 	}
 	$home_path = get_home_path();
 	$home_root = parse_url(get_bloginfo('url'));
-	$home_root = isset( $home_root['path'] ) ? trailingslashit( $home_root['path'] ) : '/';
+	$home_root = isset( $home_root[ 'path' ] ) ? trailingslashit( $home_root[ 'path' ] ) : '/';
+	if (
+		$home_root == '/' &&
+		$home_path != $_SERVER[ 'DOCUMENT_ROOT' ]
+	) {
+		$home_path = $_SERVER[ 'DOCUMENT_ROOT' ];
+	} elseif (
+		$home_root != '/' &&
+		$home_path != str_replace( '//', '/', $_SERVER[ 'DOCUMENT_ROOT' ] . $home_root ) &&
+		is_dir( $_SERVER[ 'DOCUMENT_ROOT' ] . $home_root )
+	) {
+		$home_path = str_replace( '//', '/', $_SERVER[ 'DOCUMENT_ROOT' ] . $home_root );
+	}
+
+	$home_path = trailingslashit( $home_path );
 	$home_root_lc = str_replace( '//', '/', strtolower( $home_root ) );
 	$inst_root = str_replace( '//', '/', '/' . trailingslashit( str_replace( $content_dir_root, '', str_replace( '\\', '/', WP_CONTENT_DIR ) ) ) );
 	$wprules = implode( "\n", extract_from_markers( $home_path.'.htaccess', 'WordPress' ) );
@@ -3090,10 +3287,10 @@ function wpsc_get_htaccess_info() {
 	$condition_rules[] = "RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\\\"]+ [NC]";
 	$condition_rules[] = "RewriteCond %{HTTP:Profile} !^[a-z0-9\\\"]+ [NC]";
 	if ( $wp_cache_mobile_enabled ) {
-		if ( false == empty( $wp_cache_mobile_browsers ) )
-			$condition_rules[] = "RewriteCond %{HTTP_USER_AGENT} !^.*(" . addcslashes( implode( '|', $wp_cache_mobile_browsers ), ' ' ) . ").* [NC]";
-		if ( false == empty( $wp_cache_mobile_prefixes ) )
-			$condition_rules[] = "RewriteCond %{HTTP_user_agent} !^(" . addcslashes( implode( '|', $wp_cache_mobile_prefixes ), ' ' ) . ").* [NC]";
+		if ( isset( $wp_cache_mobile_browsers ) && "" != $wp_cache_mobile_browsers )
+			$condition_rules[] = "RewriteCond %{HTTP_USER_AGENT} !^.*(" . addcslashes( str_replace( ', ', '|', $wp_cache_mobile_browsers ), ' ' ) . ").* [NC]";
+		if ( isset( $wp_cache_mobile_prefixes ) && "" != $wp_cache_mobile_prefixes )
+			$condition_rules[] = "RewriteCond %{HTTP_USER_AGENT} !^(" . addcslashes( str_replace( ', ', '|', $wp_cache_mobile_prefixes ), ' ' ) . ").* [NC]";
 	}
 	$condition_rules = apply_filters( 'supercacherewriteconditions', $condition_rules );
 
@@ -3148,11 +3345,8 @@ function clear_post_supercache( $post_id ) {
 	if ( !function_exists( 'prune_super_cache' ) )
 		include_once( 'wp-cache-phase2.php' );
 
-	wp_cache_debug( "clear_post_supercache: deleting $dir/index*.html files", 2 );
-	$files_to_check = get_all_supercache_filenames( $dir );
-	foreach( $files_to_check as $cache_file ) {
-		prune_super_cache( $dir . $cache_file, true );
-	}
+	wp_cache_debug( "clear_post_supercache: deleting files in $dir", 2 );
+	prune_super_cache( $dir, true );
 }
 
 function wp_cron_preload_cache() {
@@ -3163,6 +3357,12 @@ function wp_cron_preload_cache() {
 		wp_cache_debug( "wp_cron_preload_cache: preload cancelled", 1 );
 		return true;
 	}
+
+	if ( !function_exists( 'wp_cache_debug' ) )
+		include_once( 'wp-cache-phase1.php' );
+	if ( !function_exists( 'prune_super_cache' ) )
+		include_once( 'wp-cache-phase2.php' );
+
 	$mutex = $cache_path . "preload_mutex.tmp";
 	sleep( 3 + mt_rand( 1, 5 ) );
 	if ( @file_exists( $mutex ) ) {
@@ -3187,6 +3387,10 @@ function wp_cron_preload_cache() {
 
 	update_option( 'preload_cache_counter', array( 'c' => ( $c + 100 ), 't' => time() ) );
 
+	if ( $wp_cache_preload_email_volume == 'none' && $wp_cache_preload_email_me == 1 ) {
+		$wp_cache_preload_email_me = 0;
+		wp_cache_setting( 'wp_cache_preload_email_me', 0 );
+	}
 	if ( $wp_cache_preload_email_me && $c == 0 )
 		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Cache Preload Started', 'wp-super-cache' ), home_url(), '' ), ' ' );
 
@@ -3235,6 +3439,16 @@ function wp_cron_preload_cache() {
 						wp_remote_get( $url, array('timeout' => 60, 'blocking' => true ) );
 						wp_cache_debug( "wp_cron_preload_cache: fetched $url", 5 );
 						sleep( 1 );
+						if ( @file_exists( $cache_path . "stop_preload.txt" ) ) {
+							wp_cache_debug( "wp_cron_preload_cache: cancelling preload. stop_preload.txt found.", 5 );
+							@unlink( $mutex );
+							@unlink( $cache_path . "stop_preload.txt" );
+							@unlink( $taxonomy_filename );
+							update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
+							if ( $wp_cache_preload_email_me )
+								wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Cache Preload Stopped', 'wp-super-cache' ), home_url(), '' ), ' ' );
+							return true;
+						}
 					}
 					$fp = fopen( $taxonomy_filename, 'w' );
 					if ( $fp ) {
@@ -3247,10 +3461,8 @@ function wp_cron_preload_cache() {
 	}
 
 	if ( $wp_cache_preload_posts == 'all' || $c < $wp_cache_preload_posts ) {
-		$types = get_post_types( array( 'public' => true, 'publicly_queryable' => true ), 'names', 'or' );
-		$types = array_map( 'esc_sql', $types );
-		$types = "'" . implode( "','", $types ) . "'";
-		$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type IN ( $types ) ) AND post_status = 'publish' ORDER BY ID ASC LIMIT $c, 100" );
+		$types = wpsc_get_post_types();
+		$posts = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type IN ( $types ) ) AND post_status = 'publish' ORDER BY ID DESC LIMIT %d, 100", $c ) );
 		wp_cache_debug( "wp_cron_preload_cache: got 100 posts from position $c.", 5 );
 	} else {
 		wp_cache_debug( "wp_cron_preload_cache: no more posts to get. Limit ($wp_cache_preload_posts) reached.", 5 );
@@ -3297,7 +3509,7 @@ function wp_cron_preload_cache() {
 			sleep( 1 );
 			$count++;
 		}
-		if ( $wp_cache_preload_email_me && $wp_cache_preload_email_volume != 'less' )
+		if ( $wp_cache_preload_email_me && ( $wp_cache_preload_email_volume == 'medium' || $wp_cache_preload_email_volume == 'many' ) )
 			wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] %2$d posts refreshed', 'wp-super-cache' ), home_url(), ($c+100) ), __( "Refreshed the following posts:", 'wp-super-cache' ) . "\n$msg" );
 		if ( defined( 'DOING_CRON' ) ) {
 			wp_cache_debug( "wp_cron_preload_cache: scheduling the next preload in 30 seconds.", 5 );
@@ -3341,7 +3553,7 @@ function next_preload_message( $hook, $text, $limit = 0 ) {
 			$h = (int)($m / 60); $m = $m % 60;
 		}
 		if ( $next_time > 0 && $next_time < ( 60 * $wp_cache_preload_interval ) )
-			echo '<p><strong>' . sprintf( $text, $h, $m, $s ) . '</strong></p>';
+			echo '<div class="notice notice-warning"><p>' . sprintf( $text, $h, $m, $s ) . '</p></div>';
 		if ( ( $next_preload - time() ) <= 60 )
 			$currently_preloading = true;
 	}
@@ -3368,15 +3580,20 @@ function check_up_on_preloading() {
 add_action( 'init', 'check_up_on_preloading' ); // sometimes preloading stops working. Kickstart it.
 
 function wp_cache_disable_plugin( $delete_config_file = true ) {
-	global $wp_cache_config_file, $wp_rewrite;
+	global $wp_rewrite;
 	if ( file_exists( ABSPATH . 'wp-config.php') ) {
 		$global_config_file = ABSPATH . 'wp-config.php';
 	} else {
 		$global_config_file = dirname(ABSPATH) . '/wp-config.php';
 	}
 	$line = 'define(\'WP_CACHE\', true);';
-	if ( strpos( file_get_contents( $global_config_file ), $line ) && ( !is_writeable_ACLSafe( $global_config_file ) || !wp_cache_replace_line( 'define *\( *\'WP_CACHE\'', '//' . $line, $global_config_file ) ) )
+	if ( strpos( file_get_contents( $global_config_file ), $line ) && ( !is_writeable_ACLSafe( $global_config_file ) || !wp_cache_replace_line( 'define *\( *\'WP_CACHE\'', '', $global_config_file ) ) ) {
 		wp_die( "Could not remove WP_CACHE define from $global_config_file. Please edit that file and remove the line containing the text 'WP_CACHE'. Then refresh this page." );
+	}
+	$line = 'define( \'WPCACHEHOME\',';
+	if ( strpos( file_get_contents( $global_config_file ), $line ) && ( !is_writeable_ACLSafe( $global_config_file ) || !wp_cache_replace_line( 'define *\( *\'WPCACHEHOME\'', '', $global_config_file ) ) ) {
+		wp_die( "Could not remove WPCACHEHOME define from $global_config_file. Please edit that file and remove the line containing the text 'WPCACHEHOME'. Then refresh this page." );
+	}
 
 	uninstall_supercache( WP_CONTENT_DIR . '/cache' );
 	$file_not_deleted = false;
@@ -3400,7 +3617,7 @@ function wp_cache_disable_plugin( $delete_config_file = true ) {
 		$msg .= "</ol>\n<p>First try fixing the directory permissions with this command and refresh this page:<br /><br /><code>chmod 777 " . WP_CONTENT_DIR . "</code><br /><br />If you still see this error, you have to fix the permissions on the files themselves and refresh this page again:</p> {$code}\n<p>Don't forgot to fix things later:<br /><code>chmod 755 " . WP_CONTENT_DIR . "</code></p><p>If you don't know what <strong>chmod</strong> is use <a href='http://www.google.ie/search?hl=en&q=ftp+chmod+777'>this Google search</a> to find out all about it.</p><p>Please refresh this page when the permissions have been modified.</p>";
 		wp_die( $msg );
 	}
-	extract( wpsc_get_htaccess_info() );
+	extract( wpsc_get_htaccess_info() ); // $document_root, $apache_root, $home_path, $home_root, $home_root_lc, $inst_root, $wprules, $scrules, $condition_rules, $rules, $gziprules
 	if ( $scrules != '' && insert_with_markers( $home_path.'.htaccess', 'WPSuperCache', array() ) ) {
 		$wp_rewrite->flush_rules();
 	} elseif( $scrules != '' ) {
@@ -3447,4 +3664,297 @@ function supercache_admin_bar_render() {
 }
 add_action( 'wp_before_admin_bar_render', 'supercache_admin_bar_render' );
 
-?>
+function wpsc_cancel_preload() {
+	global $cache_path;
+	$next_preload = wp_next_scheduled( 'wp_cache_preload_hook' );
+	if ( $next_preload ) {
+		wp_cache_debug( 'wpsc_cancel_preload: unscheduling wp_cache_preload_hook' );
+		update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
+		wp_unschedule_event( $next_preload, 'wp_cache_preload_hook' );
+	}
+	$next_preload = wp_next_scheduled( 'wp_cache_full_preload_hook' );
+	if ( $next_preload ) {
+		update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
+		wp_cache_debug( 'wpsc_cancel_preload: unscheduling wp_cache_full_preload_hook' );
+		wp_unschedule_event( $next_preload, 'wp_cache_full_preload_hook' );
+	}
+	wp_cache_debug( 'wpsc_cancel_preload: creating stop_preload.txt' );
+	$fp = @fopen( $cache_path . "stop_preload.txt", 'w' );
+	@fclose( $fp );
+}
+
+function wpsc_enable_preload() {
+	global $cache_path;
+
+	@unlink( $cache_path . "preload_mutex.tmp" );
+	update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
+	wp_schedule_single_event( time() + 10, 'wp_cache_full_preload_hook' );
+}
+
+function wpsc_get_post_types() {
+
+	$preload_type_args = apply_filters( 'wpsc_preload_post_types_args', array(
+		'public'             => true,
+		'publicly_queryable' => true
+	) );
+
+	$post_types = (array) apply_filters( 'wpsc_preload_post_types', get_post_types( $preload_type_args, 'names', 'or' ));
+
+	return "'" . join( "', '", array_map( 'esc_sql', $post_types ) ) . "'";
+}
+function wpsc_post_count() {
+	global $wpdb;
+	static $count;
+
+	if ( isset( $count ) ) {
+		return $count;
+	}
+
+	$post_type_list = wpsc_get_post_types();
+	$count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type IN ( $post_type_list ) AND post_status = 'publish'" );
+
+	return $count;
+}
+function wpsc_preload_settings( $min_refresh_interval = 'NA' ) {
+	global $wp_cache_preload_interval, $wp_cache_preload_on, $wp_cache_preload_taxonomies, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $wp_cache_preload_posts, $wpdb;
+
+	$return = array();
+
+	if ( isset( $_POST[ 'action' ] ) == false || $_POST[ 'action' ] != 'preload' )
+		return $return;
+
+	if ( isset( $_POST[ 'preload_off' ] ) ) {
+		wpsc_cancel_preload();
+		$return[] = "<p><strong>" . __( 'Scheduled preloading of cache almost cancelled. It may take up to a minute for it to cancel completely.', 'wp-super-cache' ) . "</strong></p>";
+		return $return;
+	} elseif ( isset( $_POST[ 'preload_now' ] ) ) {
+		wpsc_enable_preload();
+		return $return;
+	} 
+	
+	if ( $min_refresh_interval == 'NA' ) {
+		$count = wpsc_post_count();
+		if ( $count > 1000 ) {
+			$min_refresh_interval = 720;
+		} else {
+			$min_refresh_interval = 30;
+		}
+	}
+	if ( isset( $_POST[ 'wp_cache_preload_interval' ] ) && ( $_POST[ 'wp_cache_preload_interval' ] == 0 || $_POST[ 'wp_cache_preload_interval' ] >= $min_refresh_interval ) ) {
+		// if preload interval changes than unschedule any preload jobs and schedule any new one.
+		$_POST[ 'wp_cache_preload_interval' ] = (int)$_POST[ 'wp_cache_preload_interval' ];
+		if ( $wp_cache_preload_interval != $_POST[ 'wp_cache_preload_interval' ] ) {
+			$next_preload = wp_next_scheduled( 'wp_cache_full_preload_hook' );
+			if ( $next_preload ) {
+				update_option( 'preload_cache_counter', array( 'c' => 0, 't' => time() ) );
+				add_option( 'preload_cache_stop', 1 );
+				wp_unschedule_event( $next_preload, 'wp_cache_full_preload_hook' );
+				if ( $wp_cache_preload_interval == 0 ) {
+					$return[] = "<p><strong>" . __( 'Scheduled preloading of cache cancelled.', 'wp-super-cache' ) . "</strong></p>";
+				}
+				if ( $_POST[ 'wp_cache_preload_interval' ] != 0 )
+					wp_schedule_single_event( time() + ( $_POST[ 'wp_cache_preload_interval' ] * 60 ), 'wp_cache_full_preload_hook' );
+			}
+		}
+
+		$wp_cache_preload_interval = (int)$_POST[ 'wp_cache_preload_interval' ];
+		wp_cache_setting( "wp_cache_preload_interval", $wp_cache_preload_interval );
+	}
+
+	if ( $_POST[ 'wp_cache_preload_posts' ] == 'all' ) {
+		$wp_cache_preload_posts = 'all';
+	} else {
+		$wp_cache_preload_posts = (int)$_POST[ 'wp_cache_preload_posts' ];
+	}
+	wp_cache_setting( 'wp_cache_preload_posts', $wp_cache_preload_posts );
+
+	if ( isset( $_POST[ 'wp_cache_preload_email_volume' ] ) && in_array( $_POST[ 'wp_cache_preload_email_volume' ], array( 'none', 'less', 'medium', 'many' ) ) ) {
+		$wp_cache_preload_email_volume = $_POST[ 'wp_cache_preload_email_volume' ];
+	} else {
+		$wp_cache_preload_email_volume = 'none';
+	}
+	wp_cache_setting( 'wp_cache_preload_email_volume', $wp_cache_preload_email_volume );
+
+	if ( $wp_cache_preload_email_volume == 'none' )
+		wp_cache_setting( 'wp_cache_preload_email_me', 0 );
+	else
+		wp_cache_setting( 'wp_cache_preload_email_me', 1 );
+
+	if ( isset( $_POST[ 'wp_cache_preload_taxonomies' ] ) ) {
+		$wp_cache_preload_taxonomies = 1;
+	} else {
+		$wp_cache_preload_taxonomies = 0;
+	}
+	wp_cache_setting( 'wp_cache_preload_taxonomies', $wp_cache_preload_taxonomies );
+
+	if ( isset( $_POST[ 'wp_cache_preload_on' ] ) ) {
+		$wp_cache_preload_on = 1;
+	} else {
+		$wp_cache_preload_on = 0;
+	}
+	wp_cache_setting( 'wp_cache_preload_on', $wp_cache_preload_on );
+
+	return $return;
+}
+
+function wpsc_is_preloading() {
+	if ( wp_next_scheduled( 'wp_cache_preload_hook' ) || wp_next_scheduled( 'wp_cache_full_preload_hook' ) ) { 
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function wpsc_set_default_gc( $force = false ) {
+	global $cache_path, $wp_cache_shutdown_gc, $cache_schedule_type;
+
+	if ( isset( $wp_cache_shutdown_gc ) && $wp_cache_shutdown_gc == 1 ) {
+		return false;
+	}
+
+	if ( $force ) {
+		unset( $cache_schedule_type );
+		$timestamp = wp_next_scheduled( 'wp_cache_gc' );
+		if ( $timestamp ) {
+			wp_unschedule_event( $timestamp, 'wp_cache_gc' );
+		}
+	}
+
+	// set up garbage collection with some default settings
+	if ( false == isset( $cache_schedule_type ) && false == wp_next_scheduled( 'wp_cache_gc' ) ) {
+		$cache_schedule_type     = 'interval';
+		$cache_time_interval     = 600;
+		$cache_max_time          = 1800;
+		$cache_schedule_interval = 'hourly';
+		$cache_gc_email_me       = 0;
+		wp_cache_setting( 'cache_schedule_type', $cache_schedule_type );
+		wp_cache_setting( 'cache_time_interval', $cache_time_interval );
+		wp_cache_setting( 'cache_max_time', $cache_max_time );
+		wp_cache_setting( 'cache_schedule_interval', $cache_schedule_interval );
+		wp_cache_setting( 'cache_gc_email_me', $cache_gc_email_me );
+
+		wp_schedule_single_event( time() + 600, 'wp_cache_gc' );
+	}
+
+	return true;
+
+}
+
+function add_mod_rewrite_rules() {
+	return update_mod_rewrite_rules();
+}
+
+function remove_mod_rewrite_rules() {
+	return update_mod_rewrite_rules( false );
+}
+
+function update_mod_rewrite_rules( $add_rules = true ) {
+	global $cache_path, $update_mod_rewrite_rules_error;
+
+	$update_mod_rewrite_rules_error = false;
+
+	if ( defined( "DO_NOT_UPDATE_HTACCESS" ) ) {
+		$update_mod_rewrite_rules_error = ".htaccess update disabled by admin: DO_NOT_UPDATE_HTACCESS defined";
+		return false;
+	}
+
+	if ( ! function_exists( 'get_home_path' ) ) {
+		include_once( ABSPATH . 'wp-admin/includes/file.php' ); // get_home_path()
+		include_once( ABSPATH . 'wp-admin/includes/misc.php' ); // extract_from_markers()
+	}
+	$home_path = trailingslashit( get_home_path() );
+	$home_root = parse_url( get_bloginfo( 'url' ) );
+	$home_root = isset( $home_root[ 'path' ] ) ? trailingslashit( $home_root[ 'path' ] ) : '/';
+	if (
+		$home_root == '/' &&
+		$home_path != $_SERVER[ 'DOCUMENT_ROOT' ]
+	) {
+		$home_path = $_SERVER[ 'DOCUMENT_ROOT' ];
+	} elseif (
+		$home_root != '/' &&
+		$home_path != str_replace( '//', '/', $_SERVER[ 'DOCUMENT_ROOT' ] . $home_root ) &&
+		is_dir( $_SERVER[ 'DOCUMENT_ROOT' ] . $home_root )
+	) {
+		$home_path = str_replace( '//', '/', $_SERVER[ 'DOCUMENT_ROOT' ] . $home_root );
+	}
+	$home_path = trailingslashit( $home_path );
+
+	if ( ! file_exists( $home_path . ".htaccess" ) ) {
+		$update_mod_rewrite_rules_error = ".htaccess not found: {$home_path}.htaccess";
+		return false;
+	}
+
+	$generated_rules = wpsc_get_htaccess_info();
+
+	if ( $add_rules ) {
+		$rules = $generated_rules[ 'rules' ];
+	}  else {
+		$rules = '';
+	}
+
+	$existing_rules = implode( "\n", extract_from_markers( $home_path . '.htaccess', 'WPSuperCache' ) );
+
+	if ( $existing_rules == $rules ) {
+		$update_mod_rewrite_rules_error = "rules have not changed";
+		return true;
+	}
+
+	if ( $generated_rules[ 'wprules' ] == '' ) {
+		$update_mod_rewrite_rules_error = "WordPress rules empty";
+		return false;
+	}
+
+	$url = trailingslashit( get_bloginfo( 'url' ) );
+	$original_page = wp_remote_get( $url, array( 'timeout' => 60, 'blocking' => true ) );
+	if ( is_wp_error( $original_page ) ) {
+		$update_mod_rewrite_rules_error = "Problem loading page";
+		return false;
+	}
+
+	$backup_filename = $cache_path . 'htaccess.' . mt_rand() . ".php";
+	$backup_file_contents = file_get_contents( $home_path . '.htaccess' );
+	file_put_contents( $backup_filename, "<" . "?php die(); ?" . ">" . $backup_file_contents );
+	$existing_gzip_rules = implode( "\n", extract_from_markers( $cache_path . '.htaccess', 'supercache' ) );
+	if ( $existing_gzip_rules != $generated_rules[ 'gziprules' ] ) {
+		insert_with_markers( $cache_path . '.htaccess', 'supercache', explode( "\n", $generated_rules[ 'gziprules' ] ) );
+	}
+	$wprules = extract_from_markers( $home_path . '.htaccess', 'WordPress' );
+	wpsc_remove_marker( $home_path . '.htaccess', 'WordPress' ); // remove original WP rules so SuperCache rules go on top
+	if ( insert_with_markers( $home_path . '.htaccess', 'WPSuperCache', explode( "\n", $rules ) ) && insert_with_markers( $home_path . '.htaccess', 'WordPress', $wprules ) ) {
+		$new_page = wp_remote_get( $url, array( 'timeout' => 60, 'blocking' => true ) );
+		$restore_backup = false;
+		if ( is_wp_error( $new_page ) ) {
+			$restore_backup = true;
+			$update_mod_rewrite_rules_error = "Error testing page with new .htaccess rules: " . $new_page->get_error_message() . ".";
+			wp_cache_debug( 'update_mod_rewrite_rules: failed to update rules. error fetching second page: ' . $new_page->get_error_message() );
+		} elseif ( $new_page[ 'body' ] != $original_page[ 'body' ] ) {
+			$restore_backup = true;
+			$update_mod_rewrite_rules_error = "Page test failed as pages did not match with new .htaccess rules.";
+			wp_cache_debug( 'update_mod_rewrite_rules: failed to update rules. page test failed as pages did not match. Files dumped in ' . $cache_path . ' for inspection.' );
+			wp_cache_debug( 'update_mod_rewrite_rules: original page: 1-' . md5( $original_page[ 'body' ] ) . '.txt' );
+			wp_cache_debug( 'update_mod_rewrite_rules: new page: 1-' . md5( $new_page[ 'body' ] ) . '.txt' );
+			file_put_contents( $cache_path . '1-' . md5( $original_page[ 'body' ] ) . '.txt', $original_page[ 'body' ] );
+			file_put_contents( $cache_path . '2-' . md5( $new_page[ 'body' ] ) . '.txt', $new_page[ 'body' ] );
+		}
+
+		if ( $restore_backup ) {
+			global $wp_cache_debug;
+			file_put_contents( $home_path . '.htaccess', $backup_file_contents );
+			unlink( $backup_filename );
+			if ( $wp_cache_debug ) {
+				$update_mod_rewrite_rules_error .= "<br />See debug log for further details";
+			} else {
+				$update_mod_rewrite_rules_error .= "<br />Enable debug log on Debugging page for further details and try again";
+			}
+
+			return false;
+		}
+	} else {
+		file_put_contents( $home_path . '.htaccess', $backup_file_contents );
+		unlink( $backup_filename );
+		$update_mod_rewrite_rules_error = "problem inserting rules in .htaccess and original .htaccess restored";
+		return false;
+	}
+
+	return true;
+}
diff --git a/wp-content/plugins/wp-super-cache/wp-super-cache.pot b/wp-content/plugins/wp-super-cache/wp-super-cache.pot
index 2aaf6a6dac4650e1604e14c496ece76ae81d2ac0..a1d8cbef3ea7f0e437ddb2ba02cd1034904db47b 100644
--- a/wp-content/plugins/wp-super-cache/wp-super-cache.pot
+++ b/wp-content/plugins/wp-super-cache/wp-super-cache.pot
@@ -2,9 +2,9 @@
 # This file is distributed under the same license as the WP Super Cache package.
 msgid ""
 msgstr ""
-"Project-Id-Version: WP Super Cache 1.4.8\n"
+"Project-Id-Version: WP Super Cache 1.4.9\n"
 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-super-cache\n"
-"POT-Creation-Date: 2017-02-03 14:34:28+00:00\n"
+"POT-Creation-Date: 2017-02-28 12:51:09+00:00\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -20,8 +20,8 @@ msgid ""
 "<code>wp-content</code> and <code>wp-includes</code> directories (except for "
 "PHP files) on your site with the URL you provide below. That way you can "
 "either copy all the static content to a dedicated host or mirror the files "
-"to a CDN by <a href=\"http://knowledgelayer.softlayer.com/questions/365/How"
-"+does+Origin+Pull+work%3F\" target=\"_blank\">origin pull</a>."
+"to a CDN by <a href=\"https://knowledgelayer.softlayer.com/faq/how-does-"
+"origin-pull-work\" target=\"_blank\">origin pull</a>."
 msgstr ""
 
 #: ossdl-cdn.php:154
@@ -108,13 +108,13 @@ msgstr ""
 
 #: plugins/awaitingmoderation.php:34 plugins/badbehaviour.php:65
 #: plugins/domain-mapping.php:75 plugins/jetpack.php:31
-#: plugins/searchengine.php:69 plugins/wptouch.php:22 wp-cache.php:1501
+#: plugins/searchengine.php:69 plugins/wptouch.php:22 wp-cache.php:1500
 msgid "Enabled"
 msgstr ""
 
 #: plugins/awaitingmoderation.php:35 plugins/badbehaviour.php:66
 #: plugins/domain-mapping.php:76 plugins/jetpack.php:32
-#: plugins/searchengine.php:70 plugins/wptouch.php:23 wp-cache.php:1501
+#: plugins/searchengine.php:70 plugins/wptouch.php:23 wp-cache.php:1500
 msgid "Disabled"
 msgstr ""
 
@@ -126,8 +126,8 @@ msgstr ""
 
 #: plugins/awaitingmoderation.php:40 plugins/badbehaviour.php:71
 #: plugins/domain-mapping.php:81 plugins/jetpack.php:37
-#: plugins/searchengine.php:75 plugins/wptouch.php:28 wp-cache.php:1978
-#: wp-cache.php:1980
+#: plugins/searchengine.php:75 plugins/wptouch.php:28 wp-cache.php:1977
+#: wp-cache.php:1979
 msgid "enabled"
 msgstr ""
 
@@ -166,7 +166,7 @@ msgstr ""
 msgid "Bad Behavior support is now %s"
 msgstr ""
 
-#: plugins/badbehaviour.php:83 wp-cache.php:1594 wp-cache.php:1599
+#: plugins/badbehaviour.php:83 wp-cache.php:1593 wp-cache.php:1598
 msgid "Warning!"
 msgstr ""
 
@@ -216,11 +216,11 @@ msgstr ""
 msgid "Cached"
 msgstr ""
 
-#: plugins/multisite.php:31 wp-cache.php:1514
+#: plugins/multisite.php:31 wp-cache.php:1513
 msgid "Enable"
 msgstr ""
 
-#: plugins/multisite.php:33 plugins/searchengine.php:61 wp-cache.php:1514
+#: plugins/multisite.php:33 plugins/searchengine.php:61 wp-cache.php:1513
 msgid "Disable"
 msgstr ""
 
@@ -262,17 +262,17 @@ msgid ""
 "the WPTouch helper plugin."
 msgstr ""
 
-#: wp-cache-phase2.php:1347
+#: wp-cache-phase2.php:1389
 msgid "Cache expiry cron job failed. Job will run again in 10 seconds."
 msgstr ""
 
-#: wp-cache-phase2.php:1351
+#: wp-cache-phase2.php:1393
 msgid ""
 "Cache expiry cron job took more than 30 seconds. You should probably run the "
 "garbage collector more often."
 msgstr ""
 
-#: wp-cache-phase2.php:1360
+#: wp-cache-phase2.php:1402
 msgid "[%1$s] WP Super Cache GC Report"
 msgstr ""
 
@@ -420,7 +420,7 @@ msgid ""
 "a regular basis. Use <a href=\"#expirytime\">this form</a> to enable it."
 msgstr ""
 
-#: wp-cache.php:309 wp-cache.php:337 wp-cache.php:409 wp-cache.php:2170
+#: wp-cache.php:309 wp-cache.php:337 wp-cache.php:409 wp-cache.php:2169
 msgid "Dismiss"
 msgstr ""
 
@@ -532,60 +532,60 @@ msgid ""
 "site is hosted. This will be fixed in the future."
 msgstr ""
 
-#: wp-cache.php:665
+#: wp-cache.php:663
 msgid ""
 "<strong>Warning!</strong> You attempted to enable compression but <code>zlib."
 "output_compression</code> is enabled. See #21 in the Troubleshooting section "
 "of the readme file."
 msgstr ""
 
-#: wp-cache.php:764
+#: wp-cache.php:763
 msgid "WP Super Cache Settings"
 msgstr ""
 
-#: wp-cache.php:778
+#: wp-cache.php:777
 msgid ""
 "Notice: <em>Mod_rewrite or Legacy caching enabled</em>. Showing Advanced "
 "Settings Page by default."
 msgstr ""
 
-#: wp-cache.php:789
+#: wp-cache.php:788
 msgid ""
 "Configuration file changed, some values might be wrong. Load the page again "
 "from the \"Settings\" menu to reset them."
 msgstr ""
 
-#: wp-cache.php:821
+#: wp-cache.php:820
 msgid "Caching must be enabled to use this feature"
 msgstr ""
 
-#: wp-cache.php:839 wp-cache.php:979
+#: wp-cache.php:838 wp-cache.php:978
 msgid "Cancel Cache Preload"
 msgstr ""
 
-#: wp-cache.php:847
+#: wp-cache.php:846
 msgid ""
 "Scheduled preloading of cache almost cancelled. It may take up to a minute "
 "for it to cancel completely."
 msgstr ""
 
-#: wp-cache.php:858
+#: wp-cache.php:857
 msgid "Scheduled preloading of cache cancelled."
 msgstr ""
 
-#: wp-cache.php:890 wp-cache.php:977
+#: wp-cache.php:889 wp-cache.php:976
 msgid "Preload Cache Now"
 msgstr ""
 
-#: wp-cache.php:894
+#: wp-cache.php:893
 msgid "Scheduled preloading of cache in 10 seconds."
 msgstr ""
 
-#: wp-cache.php:899
+#: wp-cache.php:898
 msgid "Scheduled preloading of cache in %d minutes"
 msgstr ""
 
-#: wp-cache.php:903
+#: wp-cache.php:902
 msgid ""
 "This will cache every published post and page on your site. It will create "
 "supercache static files so unknown visitors (including bots) will hit a "
@@ -593,298 +593,298 @@ msgid ""
 "speed as a metric when judging websites now."
 msgstr ""
 
-#: wp-cache.php:904
+#: wp-cache.php:903
 msgid ""
 "Preloading creates lots of files however. Caching is done from the newest "
 "post to the oldest so please consider only caching the newest if you have "
 "lots (10,000+) of posts. This is especially important on shared hosting."
 msgstr ""
 
-#: wp-cache.php:905
+#: wp-cache.php:904
 msgid ""
 "In &#8217;Preload Mode&#8217; regular garbage collection will only clean out "
 "old legacy files for known users, not the preloaded supercache files. This "
 "is a recommended setting when the cache is preloaded."
 msgstr ""
 
-#: wp-cache.php:909
+#: wp-cache.php:908
 msgid ""
 "Refresh preloaded cache files every %s minutes. (0 to disable, minimum %d "
 "minutes.)"
 msgstr ""
 
-#: wp-cache.php:922
+#: wp-cache.php:921
 msgid "all"
 msgstr ""
 
-#: wp-cache.php:935
+#: wp-cache.php:934
 msgid "Preload %s posts."
 msgstr ""
 
-#: wp-cache.php:942
+#: wp-cache.php:941
 msgid ""
 "Preload mode (garbage collection only on legacy cache files. Recommended.)"
 msgstr ""
 
-#: wp-cache.php:945
+#: wp-cache.php:944
 msgid "Preload tags, categories and other taxonomies."
 msgstr ""
 
-#: wp-cache.php:948
+#: wp-cache.php:947
 msgid "Send me status emails when files are refreshed."
 msgstr ""
 
-#: wp-cache.php:953
+#: wp-cache.php:952
 msgid "Many emails, 2 emails per 100 posts."
 msgstr ""
 
-#: wp-cache.php:956
+#: wp-cache.php:955
 msgid "Medium, 1 email per 100 posts."
 msgstr ""
 
-#: wp-cache.php:959
+#: wp-cache.php:958
 msgid "Less emails, 1 at the start and 1 at the end of preloading all posts."
 msgstr ""
 
-#: wp-cache.php:963
+#: wp-cache.php:962
 msgid "Refresh of cache in %d hours %d minutes and %d seconds."
 msgstr ""
 
-#: wp-cache.php:964
+#: wp-cache.php:963
 msgid "Full refresh of cache in %d hours %d minutes and %d seconds."
 msgstr ""
 
-#: wp-cache.php:970
+#: wp-cache.php:969
 msgid "Currently caching from post %d to %d."
 msgstr ""
 
-#: wp-cache.php:974
+#: wp-cache.php:973
 msgid "<strong>Page last cached:</strong> %s"
 msgstr ""
 
-#: wp-cache.php:977
+#: wp-cache.php:976
 msgid "Update Settings"
 msgstr ""
 
-#: wp-cache.php:985
+#: wp-cache.php:984
 msgid ""
 "Preloading of cache disabled. Please disable legacy page caching or talk to "
 "your host administrator."
 msgstr ""
 
-#: wp-cache.php:1002 wp-cache.php:1147
+#: wp-cache.php:1001 wp-cache.php:1146
 msgid "Caching"
 msgstr ""
 
-#: wp-cache.php:1006 wp-cache.php:1150
+#: wp-cache.php:1005 wp-cache.php:1149
 msgid "Caching On"
 msgstr ""
 
-#: wp-cache.php:1006 wp-cache.php:1009 wp-cache.php:1025 wp-cache.php:1030
-#: wp-cache.php:1031 wp-cache.php:1038 wp-cache.php:1065 wp-cache.php:1150
+#: wp-cache.php:1005 wp-cache.php:1008 wp-cache.php:1024 wp-cache.php:1029
+#: wp-cache.php:1030 wp-cache.php:1037 wp-cache.php:1064 wp-cache.php:1149
 msgid "Recommended"
 msgstr ""
 
-#: wp-cache.php:1007 wp-cache.php:1151
+#: wp-cache.php:1006 wp-cache.php:1150
 msgid "Caching Off"
 msgstr ""
 
-#: wp-cache.php:1008
+#: wp-cache.php:1007
 msgid "Use mod_rewrite to serve cache files."
 msgstr ""
 
-#: wp-cache.php:1009
+#: wp-cache.php:1008
 msgid "Use PHP to serve cache files."
 msgstr ""
 
-#: wp-cache.php:1010
+#: wp-cache.php:1009
 msgid "Legacy page caching."
 msgstr ""
 
-#: wp-cache.php:1011
+#: wp-cache.php:1010
 msgid ""
 "Mod_rewrite is fastest, PHP is almost as fast and easier to get working, "
 "while legacy caching is slower again, but more flexible and also easy to get "
 "working. New users should use PHP caching."
 msgstr ""
 
-#: wp-cache.php:1017
+#: wp-cache.php:1016
 msgid "Miscellaneous"
 msgstr ""
 
-#: wp-cache.php:1023
+#: wp-cache.php:1022
 msgid "Warning! Compression is disabled as gzencode() function was not found."
 msgstr ""
 
-#: wp-cache.php:1025
+#: wp-cache.php:1024
 msgid "Compress pages so they&#8217;re served more quickly to visitors."
 msgstr ""
 
-#: wp-cache.php:1026
+#: wp-cache.php:1025
 msgid ""
 "Compression is disabled by default because some hosts have problems with "
 "compressed files. Switching it on and off clears the cache."
 msgstr ""
 
-#: wp-cache.php:1030
+#: wp-cache.php:1029
 msgid ""
 "Don&#8217;t cache pages for <acronym title=\"Logged in users and those that "
 "comment\">known users</acronym>."
 msgstr ""
 
-#: wp-cache.php:1031
+#: wp-cache.php:1030
 msgid ""
 "Cache rebuild. Serve a supercache file to anonymous users while a new file "
 "is being generated."
 msgstr ""
 
-#: wp-cache.php:1038
+#: wp-cache.php:1037
 msgid ""
 "304 Not Modified browser caching. Indicate when a page has not been modified "
 "since it was last requested."
 msgstr ""
 
-#: wp-cache.php:1041
+#: wp-cache.php:1040
 msgid ""
 "Warning! 304 browser caching is only supported when mod_rewrite caching is "
 "not used."
 msgstr ""
 
-#: wp-cache.php:1043
+#: wp-cache.php:1042
 msgid ""
 "304 support is disabled by default because some hosts have had problems with "
 "the headers used in the past."
 msgstr ""
 
-#: wp-cache.php:1046
+#: wp-cache.php:1045
 msgid "Don&#8217;t cache pages with GET parameters. (?x=y at the end of a url)"
 msgstr ""
 
-#: wp-cache.php:1047
+#: wp-cache.php:1046
 msgid ""
 "Make known users anonymous so they&#8217;re served supercached static files."
 msgstr ""
 
-#: wp-cache.php:1048
+#: wp-cache.php:1047
 msgid ""
 "Proudly tell the world your server is <a href=\"%s\">Stephen Fry proof</a>! "
 "(places a message in your blog&#8217;s footer)"
 msgstr ""
 
-#: wp-cache.php:1054 wp-cache.php:1351 wp-cache.php:1987
+#: wp-cache.php:1053 wp-cache.php:1350 wp-cache.php:1986
 msgid "Advanced"
 msgstr ""
 
-#: wp-cache.php:1058
+#: wp-cache.php:1057
 msgid ""
 "Enable dynamic caching. Requires PHP or legacy caching. (See <a href="
 "\"http://wordpress.org/plugins/wp-super-cache/faq/\">FAQ</a> or wp-super-"
 "cache/plugins/dynamic-cache-test.php for example code.)"
 msgstr ""
 
-#: wp-cache.php:1059
+#: wp-cache.php:1058
 msgid ""
 "Mobile device support. (External plugin or theme required. See the <a href="
 "\"http://wordpress.org/plugins/wp-super-cache/faq/\">FAQ</a> for further "
 "details.)"
 msgstr ""
 
-#: wp-cache.php:1061
+#: wp-cache.php:1060
 msgid "Mobile Browsers"
 msgstr ""
 
-#: wp-cache.php:1061
+#: wp-cache.php:1060
 msgid "Mobile Prefixes"
 msgstr ""
 
-#: wp-cache.php:1063
+#: wp-cache.php:1062
 msgid ""
 "Remove UTF8/blog charset support from .htaccess file. Only necessary if you "
 "see odd characters or punctuation looks incorrect. Requires rewrite rules "
 "update."
 msgstr ""
 
-#: wp-cache.php:1064
+#: wp-cache.php:1063
 msgid "Clear all cache files when a post or page is published or updated."
 msgstr ""
 
-#: wp-cache.php:1065
+#: wp-cache.php:1064
 msgid "Extra homepage checks. (Very occasionally stops homepage caching)"
 msgstr ""
 
-#: wp-cache.php:1066
+#: wp-cache.php:1065
 msgid "Only refresh current page when comments made."
 msgstr ""
 
-#: wp-cache.php:1067
+#: wp-cache.php:1066
 msgid "List the newest cached pages on this page."
 msgstr ""
 
-#: wp-cache.php:1069
+#: wp-cache.php:1068
 msgid ""
 "Coarse file locking. You do not need this as it will slow down your website."
 msgstr ""
 
-#: wp-cache.php:1071
+#: wp-cache.php:1070
 msgid ""
 "Late init. Display cached files after WordPress has loaded. Most useful in "
 "legacy mode."
 msgstr ""
 
-#: wp-cache.php:1073
+#: wp-cache.php:1072
 msgid "Use object cache to store cached files."
 msgstr ""
 
-#: wp-cache.php:1073
+#: wp-cache.php:1072
 msgid "(Experimental)"
 msgstr ""
 
-#: wp-cache.php:1075
+#: wp-cache.php:1074
 msgid "<strong>DO NOT CACHE PAGE</strong> secret key: <a href=\"%s\">%s</a>"
 msgstr ""
 
-#: wp-cache.php:1080
+#: wp-cache.php:1079
 msgid "Cache Location"
 msgstr ""
 
-#: wp-cache.php:1085
+#: wp-cache.php:1084
 msgid ""
 "Change the location of your cache files. The default is WP_CONTENT_DIR . /"
 "cache/ which translates to %s."
 msgstr ""
 
-#: wp-cache.php:1086
+#: wp-cache.php:1085
 msgid "You must give the full path to the directory."
 msgstr ""
 
-#: wp-cache.php:1087
+#: wp-cache.php:1086
 msgid ""
 "If the directory does not exist, it will be created. Please make sure your "
 "web server user has write access to the parent directory. The parent "
 "directory must exist."
 msgstr ""
 
-#: wp-cache.php:1088
+#: wp-cache.php:1087
 msgid ""
 "If the new cache directory does not exist, it will be created and the "
 "contents of the old cache directory will be moved there. Otherwise, the old "
 "cache directory will be left where it is."
 msgstr ""
 
-#: wp-cache.php:1089
+#: wp-cache.php:1088
 msgid ""
 "Submit a blank entry to set it to the default directory, WP_CONTENT_DIR . /"
 "cache/."
 msgstr ""
 
-#: wp-cache.php:1091
+#: wp-cache.php:1090
 msgid ""
 "The plugin detected a bare directory index in your cache directory, which "
 "would let visitors see your cache files directly and might expose private "
 "posts."
 msgstr ""
 
-#: wp-cache.php:1093
+#: wp-cache.php:1092
 msgid ""
 "You are using mod_rewrite to serve cache files so the plugin has added "
 "<q>Options -Indexes</q> to the .htaccess file in the cache directory to "
@@ -893,32 +893,32 @@ msgid ""
 "mode and move the cache outside of the web root."
 msgstr ""
 
-#: wp-cache.php:1095
+#: wp-cache.php:1094
 msgid ""
 "index.html files have been added in key directories, but unless directory "
 "indexes are disabled, it is probably better to store the cache files outside "
 "of the web root of %s"
 msgstr ""
 
-#: wp-cache.php:1102
+#: wp-cache.php:1101
 msgid ""
 "Since you are using mod_rewrite to serve cache files, you must choose a "
 "directory in your web root which is <q>%s</q> and update the mod_rewrite "
 "rules in the .htaccess file."
 msgstr ""
 
-#: wp-cache.php:1110
+#: wp-cache.php:1109
 msgid "Note:"
 msgstr ""
 
-#: wp-cache.php:1112
+#: wp-cache.php:1111
 msgid ""
 "Uninstall this plugin on the plugins page. It will automatically clean up "
 "after itself. If manual intervention is required, then simple instructions "
 "are provided."
 msgstr ""
 
-#: wp-cache.php:1113
+#: wp-cache.php:1112
 msgid ""
 "If uninstalling this plugin, make sure the directory <em>%s</em> is "
 "writeable by the webserver so the files <em>advanced-cache.php</em> and "
@@ -926,14 +926,14 @@ msgid ""
 "files are writeable is probably a good idea!)"
 msgstr ""
 
-#: wp-cache.php:1114
+#: wp-cache.php:1113
 msgid ""
 "Please see the <a href=\"%1$s/wp-super-cache/readme.txt\">readme.txt</a> for "
 "instructions on uninstalling this script. Look for the heading, \"How to "
 "uninstall WP Super Cache\"."
 msgstr ""
 
-#: wp-cache.php:1115
+#: wp-cache.php:1114
 msgid ""
 "Need help? Check the <a href=\"%1$s\">Super Cache readme file</a>. It "
 "includes installation documentation, a FAQ and Troubleshooting tips. The <a "
@@ -941,15 +941,15 @@ msgid ""
 "have been answered."
 msgstr ""
 
-#: wp-cache.php:1118 wp-cache.php:1163
+#: wp-cache.php:1117 wp-cache.php:1162
 msgid "Update Status"
 msgstr ""
 
-#: wp-cache.php:1125
+#: wp-cache.php:1124
 msgid "Accepted Filenames &amp; Rejected URIs"
 msgstr ""
 
-#: wp-cache.php:1160
+#: wp-cache.php:1159
 msgid ""
 "Notice: PHP caching enabled but Supercache mod_rewrite rules detected. "
 "Cached files will be served using those rules. If your site is working ok, "
@@ -957,119 +957,119 @@ msgid ""
 "the root of your install and remove the SuperCache rules."
 msgstr ""
 
-#: wp-cache.php:1165
+#: wp-cache.php:1164
 msgid "Cache Tester"
 msgstr ""
 
-#: wp-cache.php:1166
+#: wp-cache.php:1165
 msgid "Test your cached website by clicking the test button below."
 msgstr ""
 
-#: wp-cache.php:1172
+#: wp-cache.php:1171
 msgid "Fetching %s to prime cache: "
 msgstr ""
 
-#: wp-cache.php:1174 wp-cache.php:1183 wp-cache.php:1195
+#: wp-cache.php:1173 wp-cache.php:1182 wp-cache.php:1194
 msgid "OK"
 msgstr ""
 
-#: wp-cache.php:1177
+#: wp-cache.php:1176
 msgid "Fetching first copy of %s: "
 msgstr ""
 
-#: wp-cache.php:1186 wp-cache.php:1197
+#: wp-cache.php:1185 wp-cache.php:1196
 msgid "FAILED"
 msgstr ""
 
-#: wp-cache.php:1189
+#: wp-cache.php:1188
 msgid "Fetching second copy of %s: "
 msgstr ""
 
-#: wp-cache.php:1201
+#: wp-cache.php:1200
 msgid "One or more page requests failed:"
 msgstr ""
 
-#: wp-cache.php:1220 wp-cache.php:1221
+#: wp-cache.php:1219 wp-cache.php:1220
 msgid "Page %d: %d (%s)"
 msgstr ""
 
-#: wp-cache.php:1227
+#: wp-cache.php:1226
 msgid "Page 1: %s"
 msgstr ""
 
-#: wp-cache.php:1228
+#: wp-cache.php:1227
 msgid "Page 2: %s"
 msgstr ""
 
-#: wp-cache.php:1229
+#: wp-cache.php:1228
 msgid "The timestamps on both pages match!"
 msgstr ""
 
-#: wp-cache.php:1231
+#: wp-cache.php:1230
 msgid "The pages do not match! Timestamps differ or were not found!"
 msgstr ""
 
-#: wp-cache.php:1232
+#: wp-cache.php:1231
 msgid "Things you can do:"
 msgstr ""
 
-#: wp-cache.php:1233
+#: wp-cache.php:1232
 msgid ""
 "Load your homepage in a logged out browser, check the timestamp at the end "
 "of the html source. Load the page again and compare the timestamp. Caching "
 "is working if the timestamps match."
 msgstr ""
 
-#: wp-cache.php:1234
+#: wp-cache.php:1233
 msgid ""
 "Enable logging on the Debug page here. That should help you track down the "
 "problem."
 msgstr ""
 
-#: wp-cache.php:1235
+#: wp-cache.php:1234
 msgid ""
 "You should check Page 1 and Page 2 above for errors. Your local server "
 "configuration may not allow your website to access itself."
 msgstr ""
 
-#: wp-cache.php:1243
+#: wp-cache.php:1242
 msgid "Send non-secure (non https) request for homepage"
 msgstr ""
 
-#: wp-cache.php:1244
+#: wp-cache.php:1243
 msgid "Test Cache"
 msgstr ""
 
-#: wp-cache.php:1248
+#: wp-cache.php:1247
 msgid "Delete Cached Pages"
 msgstr ""
 
-#: wp-cache.php:1249
+#: wp-cache.php:1248
 msgid ""
 "Cached pages are stored on your server as html and PHP files. If you need to "
 "delete them, use the button below."
 msgstr ""
 
-#: wp-cache.php:1252 wp-cache.php:2693 wp-cache.php:2712 wp-cache.php:2903
-#: wp-cache.php:3442
+#: wp-cache.php:1251 wp-cache.php:2691 wp-cache.php:2710 wp-cache.php:2901
+#: wp-cache.php:3440
 msgid "Delete Cache"
 msgstr ""
 
-#: wp-cache.php:1259 wp-cache.php:2699
+#: wp-cache.php:1258 wp-cache.php:2697
 msgid "Delete Cache On All Blogs"
 msgstr ""
 
-#: wp-cache.php:1264
+#: wp-cache.php:1263
 msgid "Recommended Links and Plugins"
 msgstr ""
 
-#: wp-cache.php:1265
+#: wp-cache.php:1264
 msgid ""
 "Caching is only one part of making a website faster. Here are some other "
 "plugins that will help:"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1265
 msgid ""
 "<a href=\"%s\">Yahoo! Yslow</a> is an extension for the Firefox add-on "
 "Firebug. It analyzes web pages and suggests ways to improve their "
@@ -1077,92 +1077,92 @@ msgid ""
 "the performance tools online at <a href=\"%s\">GTMetrix</a>."
 msgstr ""
 
-#: wp-cache.php:1267
+#: wp-cache.php:1266
 msgid ""
 "<a href=\"%s\">Use Google Libraries</a> allows you to load some commonly "
 "used Javascript libraries from Google webservers. Ironically, it may reduce "
 "your Yslow score."
 msgstr ""
 
-#: wp-cache.php:1268
+#: wp-cache.php:1267
 msgid ""
 "<strong>Advanced users only:</strong> Install an object cache. Choose from "
 "<a href=\"%s\">Memcached</a>, <a href=\"%s\">XCache</a>, <a href=\"%s"
 "\">eAcccelerator</a> and others."
 msgstr ""
 
-#: wp-cache.php:1269
+#: wp-cache.php:1268
 msgid ""
 "<a href=\"%s\">Cron View</a> is a useful plugin to use when trying to debug "
 "garbage collection and preload problems."
 msgstr ""
 
-#: wp-cache.php:1280
+#: wp-cache.php:1279
 msgid "Need Help?"
 msgstr ""
 
-#: wp-cache.php:1282
+#: wp-cache.php:1281
 msgid ""
 "Use the debug system in the Debug tab above. It will tell you what the "
 "plugin is doing."
 msgstr ""
 
-#: wp-cache.php:1283
+#: wp-cache.php:1282
 msgid "<a href=\"%1$s\">Installation Help</a>"
 msgstr ""
 
-#: wp-cache.php:1284
+#: wp-cache.php:1283
 msgid "<a href=\"%1$s\">Frequently Asked Questions</a>"
 msgstr ""
 
-#: wp-cache.php:1285
+#: wp-cache.php:1284
 msgid "<a href=\"%1$s\">Support Forum</a>"
 msgstr ""
 
-#: wp-cache.php:1286
+#: wp-cache.php:1285
 msgid "<a href=\"%1$s\">Development Version</a>"
 msgstr ""
 
-#: wp-cache.php:1288
+#: wp-cache.php:1287
 msgid "Rate This Plugin!"
 msgstr ""
 
-#: wp-cache.php:1289
+#: wp-cache.php:1288
 msgid ""
 "Please <a href=\"%s\">rate</a> this plugin and tell me if it works for you "
 "or not. It really helps development."
 msgstr ""
 
-#: wp-cache.php:1298
+#: wp-cache.php:1297
 msgid "Cached pages since %1$s : <strong>%2$s</strong>"
 msgstr ""
 
-#: wp-cache.php:1299
+#: wp-cache.php:1298
 msgid "Newest Cached Pages:"
 msgstr ""
 
-#: wp-cache.php:1303
+#: wp-cache.php:1302
 msgid "Cached %s seconds ago"
 msgstr ""
 
-#: wp-cache.php:1306
+#: wp-cache.php:1305
 msgid "(may not always be accurate on busy sites)"
 msgstr ""
 
-#: wp-cache.php:1322
+#: wp-cache.php:1321
 msgid ""
 "Cache plugins are PHP scripts that live in a plugins folder inside the wp-"
 "super-cache folder. They are loaded when Supercache loads, much sooner than "
 "regular WordPress plugins."
 msgstr ""
 
-#: wp-cache.php:1323
+#: wp-cache.php:1322
 msgid ""
 "This is strictly an advanced feature only and knowledge of both PHP and "
 "WordPress actions is required to create them."
 msgstr ""
 
-#: wp-cache.php:1324
+#: wp-cache.php:1323
 msgid ""
 "<strong>Warning</strong>! Due to the way WordPress upgrades plugins, the "
 "plugins you upload to wp-super-cache/plugins/ will be deleted when you "
@@ -1173,75 +1173,75 @@ msgid ""
 "\">developer documentation</a>."
 msgstr ""
 
-#: wp-cache.php:1334
+#: wp-cache.php:1333
 msgid "Available Plugins"
 msgstr ""
 
-#: wp-cache.php:1351
+#: wp-cache.php:1350
 msgid "Easy"
 msgstr ""
 
-#: wp-cache.php:1351
+#: wp-cache.php:1350
 msgid "CDN"
 msgstr ""
 
-#: wp-cache.php:1351
+#: wp-cache.php:1350
 msgid "Contents"
 msgstr ""
 
-#: wp-cache.php:1351
+#: wp-cache.php:1350
 msgid "Preload"
 msgstr ""
 
-#: wp-cache.php:1351
+#: wp-cache.php:1350
 msgid "Plugins"
 msgstr ""
 
-#: wp-cache.php:1351
+#: wp-cache.php:1350
 msgid "Debug"
 msgstr ""
 
-#: wp-cache.php:1389
+#: wp-cache.php:1388
 msgid ""
 "Notice: WP Super Cache mod_rewrite rule checks disabled unless running on <a "
 "href=\"%s\">the main site</a> of this network."
 msgstr ""
 
-#: wp-cache.php:1398
+#: wp-cache.php:1397
 msgid "Mod Rewrite Rules"
 msgstr ""
 
-#: wp-cache.php:1404
+#: wp-cache.php:1403
 msgid "WordPress MU Detected"
 msgstr ""
 
-#: wp-cache.php:1404
+#: wp-cache.php:1403
 msgid ""
 "Unfortunately, the rewrite rules cannot be updated automatically when "
 "running WordPress MU. Please open your .htaccess and add the following "
 "mod_rewrite rules above any other rules in that file."
 msgstr ""
 
-#: wp-cache.php:1406
+#: wp-cache.php:1405
 msgid "Mod Rewrite rules cannot be updated!"
 msgstr ""
 
-#: wp-cache.php:1407
+#: wp-cache.php:1406
 msgid ""
 "You must have <strong>BEGIN</strong> and <strong>END</strong> markers in %s."
 "htaccess for the auto update to work. They look like this and surround the "
 "main WordPress mod_rewrite rules:"
 msgstr ""
 
-#: wp-cache.php:1409
+#: wp-cache.php:1408
 msgid "Refresh this page when you have updated your .htaccess file."
 msgstr ""
 
-#: wp-cache.php:1413
+#: wp-cache.php:1412
 msgid "Thank you for upgrading."
 msgstr ""
 
-#: wp-cache.php:1413
+#: wp-cache.php:1412
 msgid ""
 "The mod_rewrite rules changed since you last installed this plugin. "
 "Unfortunately, you must remove the old supercache rules before the new ones "
@@ -1253,11 +1253,11 @@ msgid ""
 "brave enough to use them."
 msgstr ""
 
-#: wp-cache.php:1417
+#: wp-cache.php:1416
 msgid "Trailing slash check required."
 msgstr ""
 
-#: wp-cache.php:1417
+#: wp-cache.php:1416
 msgid ""
 "It looks like your blog has URLs that end with a \"/\". Unfortunately since "
 "you installed this plugin a duplicate content bug has been found where URLs "
@@ -1266,41 +1266,41 @@ msgid ""
 "and add these two rules to the two groups of Super Cache rules:"
 msgstr ""
 
-#: wp-cache.php:1419
+#: wp-cache.php:1418
 msgid ""
 "You can see where the rules go and examine the complete rules by clicking "
 "the \"View mod_rewrite rules\" link below."
 msgstr ""
 
-#: wp-cache.php:1433
+#: wp-cache.php:1432
 msgid "Mod Rewrite rules updated!"
 msgstr ""
 
-#: wp-cache.php:1434
+#: wp-cache.php:1433
 msgid ""
 "%s.htaccess has been updated with the necessary mod_rewrite rules. Please "
 "verify they are correct. They should look like this:"
 msgstr ""
 
-#: wp-cache.php:1436
+#: wp-cache.php:1435
 msgid "Mod Rewrite rules must be updated!"
 msgstr ""
 
-#: wp-cache.php:1437
+#: wp-cache.php:1436
 msgid ""
 "Your %s.htaccess is not writable by the webserver and must be updated with "
 "the necessary mod_rewrite rules. The new rules go above the regular "
 "WordPress rules as shown in the code below:"
 msgstr ""
 
-#: wp-cache.php:1442
+#: wp-cache.php:1441
 msgid ""
 "WP Super Cache mod rewrite rules were detected in your %s.htaccess file.<br /"
 "> Click the following link to see the lines added to that file. If you have "
 "upgraded the plugin, make sure these rules match."
 msgstr ""
 
-#: wp-cache.php:1445
+#: wp-cache.php:1444
 msgid ""
 "A difference between the rules in your .htaccess file and the plugin rewrite "
 "rules has been found. This could be simple whitespace differences, but you "
@@ -1308,247 +1308,247 @@ msgid ""
 "Click the &#8217;Update Mod_Rewrite Rules&#8217; button to update the rules."
 msgstr ""
 
-#: wp-cache.php:1447
+#: wp-cache.php:1446
 msgid "View Mod_Rewrite Rules"
 msgstr ""
 
-#: wp-cache.php:1453 wp-cache.php:3021
+#: wp-cache.php:1452 wp-cache.php:3019
 msgid "Rules must be added to %s too:"
 msgstr ""
 
-#: wp-cache.php:1459
+#: wp-cache.php:1458
 msgid "Gzip encoding rules in %s.htaccess created."
 msgstr ""
 
-#: wp-cache.php:1465
+#: wp-cache.php:1464
 msgid "Fix Configuration"
 msgstr ""
 
-#: wp-cache.php:1468
+#: wp-cache.php:1467
 msgid "Restore Default Configuration"
 msgstr ""
 
-#: wp-cache.php:1476
+#: wp-cache.php:1475
 msgid ""
 "Comment moderation is enabled. Your comment may take some time to appear."
 msgstr ""
 
-#: wp-cache.php:1501
+#: wp-cache.php:1500
 msgid "Lock Down:"
 msgstr ""
 
-#: wp-cache.php:1502
+#: wp-cache.php:1501
 msgid ""
 "Prepare your server for an expected spike in traffic by enabling the lock "
 "down. When this is enabled, new comments on a post will not refresh the "
 "cached static files."
 msgstr ""
 
-#: wp-cache.php:1503
+#: wp-cache.php:1502
 msgid ""
 "Developers: Make your plugin lock down compatible by checking the "
 "\"WPLOCKDOWN\" constant. The following code will make sure your plugin "
 "respects the WPLOCKDOWN setting."
 msgstr ""
 
-#: wp-cache.php:1505
+#: wp-cache.php:1504
 msgid "Sorry. My blog is locked down. Updates will appear shortly"
 msgstr ""
 
-#: wp-cache.php:1509
+#: wp-cache.php:1508
 msgid ""
 "WordPress is locked down. Super Cache static files will not be deleted when "
 "new comments are made."
 msgstr ""
 
-#: wp-cache.php:1511
+#: wp-cache.php:1510
 msgid ""
 "WordPress is not locked down. New comments will refresh Super Cache static "
 "files as normal."
 msgstr ""
 
-#: wp-cache.php:1517
+#: wp-cache.php:1516
 msgid "Lock Down"
 msgstr ""
 
-#: wp-cache.php:1525
+#: wp-cache.php:1524
 msgid "Directly Cached Files"
 msgstr ""
 
-#: wp-cache.php:1577
+#: wp-cache.php:1576
 msgid "Cannot delete directory"
 msgstr ""
 
-#: wp-cache.php:1586
+#: wp-cache.php:1585
 msgid "%s removed!"
 msgstr ""
 
-#: wp-cache.php:1594
+#: wp-cache.php:1593
 msgid ""
 "You must make %s writable to enable this feature. As this is a security "
 "risk, please make it read-only after your page is generated."
 msgstr ""
 
-#: wp-cache.php:1599
+#: wp-cache.php:1598
 msgid ""
 "%s is writable. Please make it readonly after your page is generated as this "
 "is a security risk."
 msgstr ""
 
-#: wp-cache.php:1614
+#: wp-cache.php:1613
 msgid "Existing direct page"
 msgstr ""
 
-#: wp-cache.php:1614
+#: wp-cache.php:1613
 msgid "Delete cached file"
 msgstr ""
 
-#: wp-cache.php:1619
+#: wp-cache.php:1618
 msgid "Add direct page:"
 msgstr ""
 
-#: wp-cache.php:1621
+#: wp-cache.php:1620
 msgid ""
 "Directly cached files are files created directly off %s where your blog "
 "lives. This feature is only useful if you are expecting a major Digg or "
 "Slashdot level of traffic to one post or page."
 msgstr ""
 
-#: wp-cache.php:1623
+#: wp-cache.php:1622
 msgid ""
 "For example: to cache <em>%1$sabout/</em>, you would enter %1$sabout/ or /"
 "about/. The cached file will be generated the next time an anonymous user "
 "visits that page."
 msgstr ""
 
-#: wp-cache.php:1624
+#: wp-cache.php:1623
 msgid ""
 "Make the textbox blank to remove it from the list of direct pages and delete "
 "the cached file."
 msgstr ""
 
-#: wp-cache.php:1629
+#: wp-cache.php:1628
 msgid "Update Direct Pages"
 msgstr ""
 
-#: wp-cache.php:1657
+#: wp-cache.php:1656
 msgctxt "timezone date format"
 msgid "Y-m-d G:i:s"
 msgstr ""
 
-#: wp-cache.php:1729
+#: wp-cache.php:1728
 msgid "Expiry Time &amp; Garbage Collection"
 msgstr ""
 
-#: wp-cache.php:1731
+#: wp-cache.php:1730
 msgid ""
 "<abbr title=\"Coordinated Universal Time\">UTC</abbr> time is <code>%s</code>"
 msgstr ""
 
-#: wp-cache.php:1734
+#: wp-cache.php:1733
 msgid "Local time is <code>%1$s</code>"
 msgstr ""
 
-#: wp-cache.php:1738
+#: wp-cache.php:1737
 msgid "Next scheduled garbage collection will be at <strong>%s UTC</strong>"
 msgstr ""
 
-#: wp-cache.php:1742
+#: wp-cache.php:1741
 msgid ""
 "Warning! <strong>PRELOAD MODE</strong> activated. Supercache files will not "
 "be deleted regardless of age."
 msgstr ""
 
-#: wp-cache.php:1760
+#: wp-cache.php:1759
 msgid "Cache Timeout"
 msgstr ""
 
-#: wp-cache.php:1761 wp-cache.php:1764
+#: wp-cache.php:1760 wp-cache.php:1763
 msgid "seconds"
 msgstr ""
 
-#: wp-cache.php:1762
+#: wp-cache.php:1761
 msgid ""
 "How long should cached pages remain fresh? Set to 0 to disable garbage "
 "collection. A good starting point is 3600 seconds."
 msgstr ""
 
-#: wp-cache.php:1763
+#: wp-cache.php:1762
 msgid "Scheduler"
 msgstr ""
 
-#: wp-cache.php:1763
+#: wp-cache.php:1762
 msgid "Timer:"
 msgstr ""
 
-#: wp-cache.php:1764
+#: wp-cache.php:1763
 msgid "Check for stale cached files every <em>interval</em> seconds."
 msgstr ""
 
-#: wp-cache.php:1765
+#: wp-cache.php:1764
 msgid "Clock:"
 msgstr ""
 
-#: wp-cache.php:1766
+#: wp-cache.php:1765
 msgid "HH:MM"
 msgstr ""
 
-#: wp-cache.php:1766
+#: wp-cache.php:1765
 msgid ""
 "Check for stale cached files at this time <strong>(UTC)</strong> or starting "
 "at this time every <em>interval</em> below."
 msgstr ""
 
-#: wp-cache.php:1768
+#: wp-cache.php:1767
 msgid "Interval:"
 msgstr ""
 
-#: wp-cache.php:1774
+#: wp-cache.php:1773
 msgid "Notification Emails"
 msgstr ""
 
-#: wp-cache.php:1775
+#: wp-cache.php:1774
 msgid "Email me when the garbage collection runs."
 msgstr ""
 
-#: wp-cache.php:1777
+#: wp-cache.php:1776
 msgid "Garbage Collection"
 msgstr ""
 
-#: wp-cache.php:1778
+#: wp-cache.php:1777
 msgid ""
 "<em>Garbage collection</em> is the simple act of throwing out your garbage. "
 "For this plugin that would be old or <em>stale</em> cached files that may be "
 "out of date. New cached files are described as <em>fresh</em>."
 msgstr ""
 
-#: wp-cache.php:1779
+#: wp-cache.php:1778
 msgid ""
 "Cached files are fresh for a limited length of time. You can set that time "
 "in the <em>Cache Timeout</em> text box on this page."
 msgstr ""
 
-#: wp-cache.php:1780
+#: wp-cache.php:1779
 msgid ""
 "Stale cached files are not removed as soon as they become stale. They have "
 "to be removed by the garbage collecter. That is why you have to tell the "
 "plugin when the garbage collector should run."
 msgstr ""
 
-#: wp-cache.php:1781
+#: wp-cache.php:1780
 msgid ""
 "Use the <em>Timer</em> or <em>Clock</em> schedulers to define when the "
 "garbage collector should run."
 msgstr ""
 
-#: wp-cache.php:1782
+#: wp-cache.php:1781
 msgid ""
 "The <em>Timer</em> scheduler tells the plugin to run the garbage collector "
 "at regular intervals. When one garbage collection is done, the next run is "
 "scheduled."
 msgstr ""
 
-#: wp-cache.php:1783
+#: wp-cache.php:1782
 msgid ""
 "Or, the <em>Clock</em> scheduler allows the garbage collection to run at "
 "specific times. If set to run hourly or twice daily, the garbage collector "
@@ -1557,42 +1557,42 @@ msgid ""
 "the time specified."
 msgstr ""
 
-#: wp-cache.php:1785
+#: wp-cache.php:1784
 msgid ""
 "There are no best garbage collection settings but here are a few scenarios. "
 "Garbage collection is separate to other actions that clear our cached files "
 "like leaving a comment or publishing a post."
 msgstr ""
 
-#: wp-cache.php:1787
+#: wp-cache.php:1786
 msgid ""
 "Sites that want to serve lots of newly generated data should set the "
 "<em>Cache Timeout</em> to 60 and use the <em>Timer</em> scheduler set to 90 "
 "seconds."
 msgstr ""
 
-#: wp-cache.php:1788
+#: wp-cache.php:1787
 msgid ""
 "Sites with widgets and rss feeds in their sidebar should probably use a "
 "timeout of 3600 seconds and set the timer to 600 seconds. Stale files will "
 "be caught within 10 minutes of going stale."
 msgstr ""
 
-#: wp-cache.php:1789
+#: wp-cache.php:1788
 msgid ""
 "Sites with lots of static content, no widgets or rss feeds in their sidebar "
 "can use a timeout of 86400 seconds or even more and set the timer to "
 "something equally long."
 msgstr ""
 
-#: wp-cache.php:1790
+#: wp-cache.php:1789
 msgid ""
 "Sites where an external data source updates at a particular time every day "
 "should set the timeout to 86400 seconds and use the Clock scheduler set "
 "appropriately."
 msgstr ""
 
-#: wp-cache.php:1792
+#: wp-cache.php:1791
 msgid ""
 "Checking for and deleting expired files is expensive, but it&#8217;s "
 "expensive leaving them there too. On a very busy site, you should set the "
@@ -1603,81 +1603,81 @@ msgid ""
 "using mod_rewrite or PHP caching."
 msgstr ""
 
-#: wp-cache.php:1793
+#: wp-cache.php:1792
 msgid "Set the expiry time to 0 seconds to disable garbage collection."
 msgstr ""
 
-#: wp-cache.php:1794
+#: wp-cache.php:1793
 msgid "Change Expiration"
 msgstr ""
 
-#: wp-cache.php:1838
+#: wp-cache.php:1837
 msgid "Rejected User Agents"
 msgstr ""
 
-#: wp-cache.php:1839
+#: wp-cache.php:1838
 msgid ""
 "Strings in the HTTP &#8217;User Agent&#8217; header that prevent WP-Cache "
 "from caching bot, spiders, and crawlers&#8217; requests. Note that super "
 "cached files are still sent to these agents if they already exists."
 msgstr ""
 
-#: wp-cache.php:1846
+#: wp-cache.php:1845
 msgid "Save UA Strings"
 msgstr ""
 
-#: wp-cache.php:1869
+#: wp-cache.php:1868
 msgid ""
 "Do not cache the following page types. See the <a href=\"http://codex."
 "wordpress.org/Conditional_Tags\">Conditional Tags</a> documentation for a "
 "complete discussion on each type."
 msgstr ""
 
-#: wp-cache.php:1872
+#: wp-cache.php:1871
 msgid "Single Posts"
 msgstr ""
 
-#: wp-cache.php:1873
+#: wp-cache.php:1872
 msgid "Pages"
 msgstr ""
 
-#: wp-cache.php:1874
+#: wp-cache.php:1873
 msgid "Front Page"
 msgstr ""
 
-#: wp-cache.php:1875
+#: wp-cache.php:1874
 msgid "Home"
 msgstr ""
 
-#: wp-cache.php:1876
+#: wp-cache.php:1875
 msgid "Archives"
 msgstr ""
 
-#: wp-cache.php:1877
+#: wp-cache.php:1876
 msgid "Tags"
 msgstr ""
 
-#: wp-cache.php:1878
+#: wp-cache.php:1877
 msgid "Category"
 msgstr ""
 
-#: wp-cache.php:1879
+#: wp-cache.php:1878
 msgid "Feeds"
 msgstr ""
 
-#: wp-cache.php:1880
+#: wp-cache.php:1879
 msgid "Search Pages"
 msgstr ""
 
-#: wp-cache.php:1881
+#: wp-cache.php:1880
 msgid "Author Pages"
 msgstr ""
 
-#: wp-cache.php:1883 wp-cache.php:1997
+#: wp-cache.php:1882 wp-cache.php:1996
 msgid "Save"
 msgstr ""
 
-#: wp-cache.php:1900
+#: wp-cache.php:1899
 msgid ""
 "Add here strings (not a filename) that forces a page not to be cached. For "
 "example, if your URLs include year and you dont want to cache last year "
@@ -1686,51 +1686,51 @@ msgid ""
 "cache that page."
 msgstr ""
 
-#: wp-cache.php:1906
+#: wp-cache.php:1905
 msgid "Save Strings"
 msgstr ""
 
-#: wp-cache.php:1922
+#: wp-cache.php:1921
 msgid ""
 "Add here those filenames that can be cached, even if they match one of the "
 "rejected substring specified above."
 msgstr ""
 
-#: wp-cache.php:1928
+#: wp-cache.php:1927
 msgid "Save Files"
 msgstr ""
 
-#: wp-cache.php:1971
+#: wp-cache.php:1970
 msgid "Currently logging to: %s"
 msgstr ""
 
-#: wp-cache.php:1974
+#: wp-cache.php:1973
 msgid ""
 "Fix problems with the plugin by debugging it here. It can log them to a file "
 "in your cache directory."
 msgstr ""
 
-#: wp-cache.php:1978
+#: wp-cache.php:1977
 msgid "Debugging"
 msgstr ""
 
-#: wp-cache.php:1979
+#: wp-cache.php:1978
 msgid "IP Address"
 msgstr ""
 
-#: wp-cache.php:1979
+#: wp-cache.php:1978
 msgid "(only log requests from this IP address. Your IP is %s)"
 msgstr ""
 
-#: wp-cache.php:1980
+#: wp-cache.php:1979
 msgid "Cache Status Messages"
 msgstr ""
 
-#: wp-cache.php:1981
+#: wp-cache.php:1980
 msgid "Display comments at the end of every page like this:"
 msgstr ""
 
-#: wp-cache.php:1987
+#: wp-cache.php:1986
 msgid ""
 "In very rare cases two problems may arise on some blogs:<ol><li> The front "
 "page may start downloading as a zip file.</li><li> The wrong page is "
@@ -1738,7 +1738,7 @@ msgid ""
 "and the permalink structure is <em>/%category%/%postname%/</em>.</li></ol>"
 msgstr ""
 
-#: wp-cache.php:1988
+#: wp-cache.php:1987
 msgid ""
 "I&#8217;m 99% certain that they aren&#8217;t bugs in WP Super Cache and they "
 "only happen in very rare cases but you can run a simple check once every 5 "
@@ -1746,54 +1746,54 @@ msgid ""
 "emailed if there is a problem."
 msgstr ""
 
-#: wp-cache.php:1990
+#: wp-cache.php:1989
 msgid "Check front page every 5 minutes."
 msgstr ""
 
-#: wp-cache.php:1991
+#: wp-cache.php:1990
 msgid "Front page text"
 msgstr ""
 
-#: wp-cache.php:1991
+#: wp-cache.php:1990
 msgid ""
 "Text to search for on your front page. If this text is missing, the cache "
 "will be cleared. Leave blank to disable."
 msgstr ""
 
-#: wp-cache.php:1992
+#: wp-cache.php:1991
 msgid "Clear cache on error."
 msgstr ""
 
-#: wp-cache.php:1993
+#: wp-cache.php:1992
 msgid "Email the blog admin when checks are made. (useful for testing)"
 msgstr ""
 
-#: wp-cache.php:2007
+#: wp-cache.php:2006
 msgid ""
 "Error: GZIP compression is enabled. Disable it if you want to enable wp-"
 "cache."
 msgstr ""
 
-#: wp-cache.php:2057 wp-cache.php:2356 wp-cache.php:2392
+#: wp-cache.php:2056 wp-cache.php:2355 wp-cache.php:2391
 msgid "Warning"
 msgstr ""
 
-#: wp-cache.php:2057
+#: wp-cache.php:2056
 msgid ""
 "GZIP compression is enabled in WordPress, wp-cache will be bypassed until "
 "you disable gzip compression."
 msgstr ""
 
-#: wp-cache.php:2154 wp-cache.php:2160
+#: wp-cache.php:2153 wp-cache.php:2159
 msgid "WP Super Cache Warning!"
 msgstr ""
 
-#: wp-cache.php:2155
+#: wp-cache.php:2154
 msgid ""
 "All users of this site have been logged out to refresh their login cookies."
 msgstr ""
 
-#: wp-cache.php:2161
+#: wp-cache.php:2160
 msgid ""
 "Your server is configured to show files and directories, which may expose "
 "sensitive data such as login cookies to attackers in the cache directories. "
@@ -1802,77 +1802,77 @@ msgid ""
 "directory on the Advanced Settings page."
 msgstr ""
 
-#: wp-cache.php:2163
+#: wp-cache.php:2162
 msgid ""
 "If you just installed WP Super Cache for the first time, you can dismiss "
 "this message. Otherwise, you should probably refresh the login cookies of "
 "all logged in WordPress users here by clicking the logout link below."
 msgstr ""
 
-#: wp-cache.php:2166
+#: wp-cache.php:2165
 msgid ""
 "Your site is using a very old version of WordPress. When you update to the "
 "latest version everyone will be logged out and cookie information updated."
 msgstr ""
 
-#: wp-cache.php:2168
+#: wp-cache.php:2167
 msgid ""
 "The logout link will log out all WordPress users on this site except you. "
 "Your authentication cookie will be updated, but you will not be logged out."
 msgstr ""
 
-#: wp-cache.php:2172
+#: wp-cache.php:2171
 msgid "Logout"
 msgstr ""
 
-#: wp-cache.php:2276 wp-cache.php:2281 wp-cache.php:2315 wp-cache.php:2320
-#: wp-cache.php:2326
+#: wp-cache.php:2275 wp-cache.php:2280 wp-cache.php:2314 wp-cache.php:2319
+#: wp-cache.php:2325
 msgid "Error"
 msgstr ""
 
-#: wp-cache.php:2276
+#: wp-cache.php:2275
 msgid ""
 "Your cache directory (<strong>%1$s</strong>) did not exist and couldn&#8217;"
 "t be created by the web server. Check %1$s permissions."
 msgstr ""
 
-#: wp-cache.php:2281
+#: wp-cache.php:2280
 msgid ""
 "Your cache directory (<strong>%1$s</strong>) or <strong>%2$s</strong> need "
 "to be writable for this plugin to work. Double-check it."
 msgstr ""
 
-#: wp-cache.php:2315
+#: wp-cache.php:2314
 msgid ""
 "Your WP-Cache config file (<strong>%s</strong>) is out of date and not "
 "writable by the Web server. Please delete it and refresh this page."
 msgstr ""
 
-#: wp-cache.php:2320
+#: wp-cache.php:2319
 msgid ""
 "Configuration file missing and %1$s  directory (<strong>%2$s</strong>) is "
 "not writable by the web server. Check its permissions."
 msgstr ""
 
-#: wp-cache.php:2326
+#: wp-cache.php:2325
 msgid ""
 "Sample WP-Cache config file (<strong>%s</strong>) does not exist. Verify "
 "your installation."
 msgstr ""
 
-#: wp-cache.php:2356
+#: wp-cache.php:2355
 msgid "Could not update %s!</em> WPCACHEHOME must be set in config file."
 msgstr ""
 
-#: wp-cache.php:2392
+#: wp-cache.php:2391
 msgid "%s/advanced-cache.php</em> does not exist or cannot be updated."
 msgstr ""
 
-#: wp-cache.php:2393
+#: wp-cache.php:2392
 msgid "1. If it already exists, please delete the file first."
 msgstr ""
 
-#: wp-cache.php:2394
+#: wp-cache.php:2393
 msgid ""
 "2. Make %1$s writable using the chmod command through your ftp or server "
 "software. (<em>chmod 777 %1$s</em>) and refresh this page. This is only a "
@@ -1880,24 +1880,24 @@ msgid ""
 "again. (Change 777 to 755 in the previous command)"
 msgstr ""
 
-#: wp-cache.php:2395
+#: wp-cache.php:2394
 msgid "3. Refresh this page to update <em>%s/advanced-cache.php</em>"
 msgstr ""
 
-#: wp-cache.php:2396
+#: wp-cache.php:2395
 msgid ""
 "If that doesn&#8217;t work, make sure the file <em>%s/advanced-cache.php</"
 "em> doesn&#8217;t exist:"
 msgstr ""
 
-#: wp-cache.php:2397
+#: wp-cache.php:2396
 msgid ""
 "<li>1. Open <em>%1$s$wp_cache_file</em> in a text editor.</li><li>2. Change "
 "the text <em>CACHEHOME</em> to <em>%2$s</em></li><li>3. Save the file and "
 "copy it to <em>%3$s</em> and refresh this page.</li>"
 msgstr ""
 
-#: wp-cache.php:2420
+#: wp-cache.php:2419
 msgid ""
 "<h3>WP_CACHE constant set to false</h3><p>The WP_CACHE constant is used by "
 "WordPress to load the code that serves cached pages. Unfortunately, it is "
@@ -1906,20 +1906,20 @@ msgid ""
 "('WP_CACHE', true);</code></p>"
 msgstr ""
 
-#: wp-cache.php:2422
+#: wp-cache.php:2421
 msgid ""
 "<strong>Error: WP_CACHE is not enabled</strong> in your <code>wp-config.php</"
 "code> file and I couldn&#8217;t modify it."
 msgstr ""
 
-#: wp-cache.php:2423
+#: wp-cache.php:2422
 msgid ""
 "Edit <code>%s</code> and add the following line:<br /> <code>define"
 "('WP_CACHE', true);</code><br />Otherwise, <strong>WP-Cache will not be "
 "executed</strong> by WordPress core. "
 msgstr ""
 
-#: wp-cache.php:2427
+#: wp-cache.php:2426
 msgid ""
 "<h3>WP_CACHE constant added to wp-config.php</h3><p>If you continue to see "
 "this warning message please see point 5 of the <a href=\"http://wordpress."
@@ -1927,131 +1927,131 @@ msgid ""
 "line must be moved up."
 msgstr ""
 
-#: wp-cache.php:2455
+#: wp-cache.php:2454
 msgid "Cache Contents"
 msgstr ""
 
-#: wp-cache.php:2458
+#: wp-cache.php:2457
 msgid "Object cache in use. No cache listing available."
 msgstr ""
 
-#: wp-cache.php:2482
+#: wp-cache.php:2481
 msgid "Deleting supercache file: <strong>%s</strong><br />"
 msgstr ""
 
-#: wp-cache.php:2504
+#: wp-cache.php:2502
 msgid "Deleting wp-cache file: <strong>%s</strong><br />"
 msgstr ""
 
-#: wp-cache.php:2571
+#: wp-cache.php:2569
 msgid ""
 "Cache stats are not automatically generated. You must click the link below "
 "to regenerate the stats on this page."
 msgstr ""
 
-#: wp-cache.php:2572
+#: wp-cache.php:2570
 msgid "Regenerate cache stats"
 msgstr ""
 
-#: wp-cache.php:2574
+#: wp-cache.php:2572
 msgid "Cache stats last generated: %s minutes ago."
 msgstr ""
 
-#: wp-cache.php:2580
+#: wp-cache.php:2578
 msgid "WP-Cache"
 msgstr ""
 
-#: wp-cache.php:2581 wp-cache.php:2596
+#: wp-cache.php:2579 wp-cache.php:2594
 msgid "%s Cached Pages"
 msgstr ""
 
-#: wp-cache.php:2582 wp-cache.php:2601
+#: wp-cache.php:2580 wp-cache.php:2599
 msgid "%s Expired Pages"
 msgstr ""
 
-#: wp-cache.php:2595
+#: wp-cache.php:2593
 msgid "WP-Super-Cache"
 msgstr ""
 
-#: wp-cache.php:2605
+#: wp-cache.php:2603
 msgid "Fresh WP-Cached Files"
 msgstr ""
 
-#: wp-cache.php:2606 wp-cache.php:2622 wp-cache.php:2638 wp-cache.php:2654
+#: wp-cache.php:2604 wp-cache.php:2620 wp-cache.php:2636 wp-cache.php:2652
 msgid "URI"
 msgstr ""
 
-#: wp-cache.php:2606 wp-cache.php:2622
+#: wp-cache.php:2604 wp-cache.php:2620
 msgid "Key"
 msgstr ""
 
-#: wp-cache.php:2606 wp-cache.php:2622 wp-cache.php:2638 wp-cache.php:2654
+#: wp-cache.php:2604 wp-cache.php:2620 wp-cache.php:2636 wp-cache.php:2652
 msgid "Age"
 msgstr ""
 
-#: wp-cache.php:2606 wp-cache.php:2622 wp-cache.php:2638 wp-cache.php:2654
+#: wp-cache.php:2604 wp-cache.php:2620 wp-cache.php:2636 wp-cache.php:2652
 msgid "Delete"
 msgstr ""
 
-#: wp-cache.php:2621
+#: wp-cache.php:2619
 msgid "Stale WP-Cached Files"
 msgstr ""
 
-#: wp-cache.php:2637
+#: wp-cache.php:2635
 msgid "Fresh Super Cached Files"
 msgstr ""
 
-#: wp-cache.php:2653
+#: wp-cache.php:2651
 msgid "Stale Super Cached Files"
 msgstr ""
 
-#: wp-cache.php:2669
+#: wp-cache.php:2667
 msgid "Hide file list"
 msgstr ""
 
-#: wp-cache.php:2671
+#: wp-cache.php:2669
 msgid "Too many cached files, no listing possible."
 msgstr ""
 
-#: wp-cache.php:2673
+#: wp-cache.php:2671
 msgid "List all cached files"
 msgstr ""
 
-#: wp-cache.php:2676
+#: wp-cache.php:2674
 msgid ""
 "Expired files are files older than %s seconds. They are still used by the "
 "plugin and are deleted periodically."
 msgstr ""
 
-#: wp-cache.php:2687
+#: wp-cache.php:2685
 msgid "Delete Expired"
 msgstr ""
 
-#: wp-cache.php:2712
+#: wp-cache.php:2710
 msgid "Delete Super Cache cached files (opens in new window)"
 msgstr ""
 
-#: wp-cache.php:2879
+#: wp-cache.php:2877
 msgid "%1$s is Stephen Fry proof thanks to caching by %2$s"
 msgstr ""
 
-#: wp-cache.php:2912
+#: wp-cache.php:2910
 msgid ""
 "WP Super Cache must be configured. Go to <a href=\"%s\">the admin page</a> "
 "to enable and configure the plugin."
 msgstr ""
 
-#: wp-cache.php:2918
+#: wp-cache.php:2916
 msgid "Settings"
 msgstr ""
 
-#: wp-cache.php:2928
+#: wp-cache.php:2926
 msgid ""
 "WP Super Cache is disabled. Please go to the <a href=\"%s\">plugin admin "
 "page</a> to enable caching."
 msgstr ""
 
-#: wp-cache.php:2931
+#: wp-cache.php:2929
 msgid ""
 "Warning! WP Super Cache caching <strong>was</strong> broken but has been "
 "<strong>fixed</strong>! The script advanced-cache.php could not load wp-"
@@ -2060,146 +2060,146 @@ msgid ""
 "message."
 msgstr ""
 
-#: wp-cache.php:2952
+#: wp-cache.php:2950
 msgid "[%s] Front page is gzipped! Please clear cache!"
 msgstr ""
 
-#: wp-cache.php:2952
+#: wp-cache.php:2950
 msgid ""
 "Please visit %s to clear the cache as the front page of your site is now "
 "downloading!"
 msgstr ""
 
-#: wp-cache.php:2955
+#: wp-cache.php:2953
 msgid "[%s] Front page is gzipped! Cache Cleared!"
 msgstr ""
 
-#: wp-cache.php:2955
+#: wp-cache.php:2953
 msgid ""
 "The cache on your blog has been cleared because the front page of your site "
 "is now downloading. Please visit %s to verify the cache has been cleared."
 msgstr ""
 
-#: wp-cache.php:2962
+#: wp-cache.php:2960
 msgid "[%s] Front page is not correct! Please clear cache!"
 msgstr ""
 
-#: wp-cache.php:2962
+#: wp-cache.php:2960
 msgid ""
 "Please visit %1$s to clear the cache as the front page of your site is not "
 "correct and missing the text, \"%2$s\"!"
 msgstr ""
 
-#: wp-cache.php:2965
+#: wp-cache.php:2963
 msgid "[%s] Front page is not correct! Cache Cleared!"
 msgstr ""
 
-#: wp-cache.php:2965
+#: wp-cache.php:2963
 msgid ""
 "The cache on your blog has been cleared because the front page of your site "
 "is missing the text \"%2$s\". Please visit %1$s to verify the cache has been "
 "cleared."
 msgstr ""
 
-#: wp-cache.php:2970
+#: wp-cache.php:2968
 msgid "[%s] Front page check!"
 msgstr ""
 
-#: wp-cache.php:2970
+#: wp-cache.php:2968
 msgid ""
 "WP Super Cache has checked the front page of your blog. Please visit %s if "
 "you would like to disable this."
 msgstr ""
 
-#: wp-cache.php:3013
+#: wp-cache.php:3011
 msgid "Cannot update .htaccess"
 msgstr ""
 
-#: wp-cache.php:3013
+#: wp-cache.php:3011
 msgid ""
 "The file <code>%s.htaccess</code> cannot be modified by the web server. "
 "Please correct this using the chmod command or your ftp client."
 msgstr ""
 
-#: wp-cache.php:3013
+#: wp-cache.php:3011
 msgid "Refresh this page when the file permissions have been modified."
 msgstr ""
 
-#: wp-cache.php:3013
+#: wp-cache.php:3011
 msgid ""
 "Alternatively, you can edit your <code>%s.htaccess</code> file manually and "
 "add the following code (before any WordPress rules):"
 msgstr ""
 
-#: wp-cache.php:3017
+#: wp-cache.php:3015
 msgid ""
 "To serve static html files your server must have the correct mod_rewrite "
 "rules added to a file called <code>%s.htaccess</code>"
 msgstr ""
 
-#: wp-cache.php:3018
+#: wp-cache.php:3016
 msgid "You can edit the file yourself. Add the following rules."
 msgstr ""
 
-#: wp-cache.php:3019
+#: wp-cache.php:3017
 msgid " Make sure they appear before any existing WordPress rules. "
 msgstr ""
 
-#: wp-cache.php:3027
+#: wp-cache.php:3025
 msgid "Update Mod_Rewrite Rules"
 msgstr ""
 
-#: wp-cache.php:3190
+#: wp-cache.php:3188
 msgid "[%1$s] Cache Preload Started"
 msgstr ""
 
-#: wp-cache.php:3220
+#: wp-cache.php:3218
 msgid "[%1$s] Refreshing %2$s taxonomy from %3$d to %4$d"
 msgstr ""
 
-#: wp-cache.php:3269
+#: wp-cache.php:3267
 msgid "[%1$s] Refreshing posts from %2$d to %3$d"
 msgstr ""
 
-#: wp-cache.php:3290
+#: wp-cache.php:3288
 msgid "[%1$s] Cache Preload Stopped"
 msgstr ""
 
-#: wp-cache.php:3300
+#: wp-cache.php:3298
 msgid "[%1$s] %2$d posts refreshed"
 msgstr ""
 
-#: wp-cache.php:3300
+#: wp-cache.php:3298
 msgid "Refreshed the following posts:"
 msgstr ""
 
-#: wp-cache.php:3310
+#: wp-cache.php:3308
 msgid "Scheduling next preload refresh in %d minutes."
 msgstr ""
 
-#: wp-cache.php:3321
+#: wp-cache.php:3319
 msgid "[%s] Cache Preload Completed"
 msgstr ""
 
-#: wp-cache.php:3321
+#: wp-cache.php:3319
 msgid "Cleaning up old supercache files."
 msgstr ""
 
-#: wp-cache.php:3363
+#: wp-cache.php:3361
 msgid "[%s] Preload may have stalled."
 msgstr ""
 
-#: wp-cache.php:3363
+#: wp-cache.php:3361
 msgid ""
 "Preload has been restarted.\n"
 "%s"
 msgstr ""
 
-#: wp-cache.php:3406
+#: wp-cache.php:3404
 msgid "Supercache Uninstall Problems"
 msgstr ""
 
-#: wp-cache.php:3406
+#: wp-cache.php:3404
 msgid ""
 "Dear User,\n"
 "\n"
@@ -2217,7 +2217,7 @@ msgid ""
 "http://wordpress.org/plugins/wp-super-cache/"
 msgstr ""
 
-#: wp-cache.php:3443
+#: wp-cache.php:3441
 msgid "Delete cache of the current page"
 msgstr ""