From b15265742c99c86ac50b3000320511342e1e7bf0 Mon Sep 17 00:00:00 2001
From: lechuck <lechuck@autistici.org>
Date: Fri, 3 Jun 2016 01:02:11 +0100
Subject: [PATCH] [auto] Plugin: wp-super-cache 1.4.8

---
 .../plugins/wp-super-cache/Changelog.txt      |  240 ++++
 .../plugins/wp-super-cache/advanced-cache.php |    8 +-
 .../plugins/wp-super-cache/ossdl-cdn.php      |    2 +-
 .../wp-super-cache/plugins/domain-mapping.php |    2 +-
 wp-content/plugins/wp-super-cache/readme.txt  |   48 +-
 .../plugins/wp-super-cache/wp-cache-base.php  |   11 +-
 .../wp-super-cache/wp-cache-phase1.php        |   95 +-
 .../wp-super-cache/wp-cache-phase2.php        |  178 ++-
 .../plugins/wp-super-cache/wp-cache.php       |  601 +++++++---
 .../plugins/wp-super-cache/wp-super-cache.pot | 1056 +++++++++--------
 10 files changed, 1490 insertions(+), 751 deletions(-)

diff --git a/wp-content/plugins/wp-super-cache/Changelog.txt b/wp-content/plugins/wp-super-cache/Changelog.txt
index 6ebd82540..3a59ee0b8 100644
--- a/wp-content/plugins/wp-super-cache/Changelog.txt
+++ b/wp-content/plugins/wp-super-cache/Changelog.txt
@@ -1,3 +1,243 @@
+2015-10-08 17:14  donncha
+
+	* wp-cache.php: Don't check if .htaccess already created as the
+	  index check already created it. Props Tigertech. Ref:
+	  https://wordpress.org/support/topic/all-website-pages-downloading-gz-file-after-latest-update?replies=28#post-7494087
+
+2015-09-25 11:20  donncha
+
+	* Changelog.txt: Updated changelog
+
+2015-09-25 10:55  donncha
+
+	* readme.txt, wp-cache.php: Bump version to release 1.4.5 and add
+	  changelog
+
+2015-09-24 15:37  donncha
+
+	* wp-cache-base.php, wp-cache-phase1.php, wp-cache-phase2.php,
+	  wp-cache.php: * Add index.html files and "-index" directives to
+	  stop indexing of directories
+	  * Sanitise input on settings page
+	  * MD5 the cookie, use JSON to encode meta files, and rename them
+	  to .php
+
+2015-09-24 11:37  donncha
+
+	* readme.txt: Changed homepage link and ocaoimh.ie to z9.io
+
+2015-09-24 11:33  donncha
+
+	* readme.txt: Minor update to the description of cache rebuild
+	  feature.
+
+2015-09-24 10:39  donncha
+
+	* wp-cache-phase2.php: Reduce "needs rebuild" time to 10 seconds,
+	  so those pages refresh faster.
+
+2015-08-28 16:28  donncha
+
+	* wp-cache-phase1.php: Because sometimes your editing in HTTPS
+	  while your site is on HTTP. Thanks kraftbj
+
+2015-08-25 21:42  kraftbj
+
+	* wp-cache-phase2.php: Swap post_permalink with get_permalink. Both
+	  are exactly the same and old enough to not impact any users.
+	  post_permalink slated for deprecation in 4.4.
+
+2015-08-10 14:06  donncha
+
+	* wp-cache-phase2.php: Avoid PHP warnings, props @daneodekirk
+
+2015-08-10 13:25  donncha
+
+	* wp-cache.php: Use $wpdb->blogid rather than get_current_blog_id
+	  as the former returns 0 on single site installs. Props
+	  @daneodekirk
+
+2015-07-30 10:13  donncha
+
+	* Changelog.txt, readme.txt: Updated changelog
+
+2015-07-29 13:08  donncha
+
+	* wp-cache-phase2.php: Remove this function call as it's not
+	  defined. Ref:
+	  https://github.com/Automattic/wp-super-cache/commit/4f3229009e5c6c8487dd883910ea076a8e3b7e26
+
+2015-07-27 16:36  kraftbj
+
+	* wp-cache.php: Don't flush settings for expiry time and garbage
+	  collection. See
+	  https://github.com/Automattic/wp-super-cache/pull/49
+
+2015-07-27 16:28  donncha
+
+	* wp-cache-base.php: Remove CacheMeta class as it's not used any
+	  more and caused APC errors. Ref:
+	  https://github.com/Automattic/wp-super-cache/pull/21
+
+2015-07-24 15:21  kraftbj
+
+	* wp-cache.php: Check if listfile isset to prevent PHP warning.
+
+2015-07-23 13:56  donncha
+
+	* wp-cache.php: Remember the settings on the advanced settings page
+	  when submitting the easy settings form. Thanks Jeremy Herve for
+	  the bug report!
+
+2015-07-22 15:52  donncha
+
+	* Changelog.txt, readme.txt: Updated changelog
+
+2015-07-22 11:25  donncha
+
+	* wp-cache-phase2.php: Fixed typo in debug log entry
+
+2015-07-15 11:56  donncha
+
+	* wp-cache.php: * Added uninstall function as well as deactivate
+	  function. The deactivate function does not delete the config file
+	  but it does disable caching because scheduled jobs must be
+	  enabled in the settings page when the config file is used on
+	  activation again.
+	  * Fixed a bug where deactivating the plugin without visiting the
+	  settings page causes a fatal error so the plugin can't be
+	  deactivated
+
+2015-07-02 14:19  donncha
+
+	* wp-cache-phase2.php: Minor changes to debugging
+
+2015-07-02 13:58  donncha
+
+	* wp-cache-phase2.php: * prune_super_cache: exit immediately if the
+	  file to be deleted doesn't exist
+	  * Add extra debugging
+
+2015-07-02 12:10  donncha
+
+	* wp-cache-phase2.php: Remove https from the home url as well
+
+2015-07-01 16:37  donncha
+
+	* wp-cache-phase2.php: As so many checks for "should we cache this
+	  page?" were put to the end of page generation the rebuild system
+	  was broken. This fixes it by deleting the rebuild files created
+	  earlier if the current page isn't to be cached (and thus creating
+	  new cache files)
+
+2015-07-01 15:46  donncha
+
+	* wp-cache-phase1.php: Always make sure supercachedirs have
+	  trailing slashes
+
+2015-07-01 15:30  donncha
+
+	* wp-cache-phase1.php: Cache the output of
+	  wp_cache_get_cookies_values() for repeat calls
+
+2015-07-01 14:59  donncha
+
+	* wp-cache-phase1.php: Use the pid to help logging on busy servers
+
+2015-07-01 14:51  donncha
+
+	* plugins/domain-mapping.php: Suercache urls end in slashes
+
+2015-06-23 15:32  kraftbj
+
+	* wp-cache-phase1.php: Check for If-Modified-Since before using it
+	  as it is not always defined.
+
+2015-06-03 02:36  kraftbj
+
+	* advanced-cache.php: Do not display broken messages for XMLRPC,
+	  REST, AJAX requests.
+
+2015-05-15 14:12  kraftbj
+
+	* wp-cache-phase2.php, wp-cache.php: Fix improper site_url usage
+	  * Update site_url to home_url in another e-mail subject
+	  * Use admin_url instead of constructing URL from site_url
+
+2015-05-15 14:08  kraftbj
+
+	* wp-cache.php: Use home_url in Preload Cron e-mails.
+
+2015-05-15 11:13  donncha
+
+	* wp-cache-phase1.php, wp-cache-phase2.php: Revert 1149165 as it's
+	  not needed any more.
+
+2015-05-15 11:02  donncha
+
+	* readme.txt: Bump the tested to version number to 4.2.2
+
+2015-05-13 21:01  kraftbj
+
+	* wp-cache.php: Improve the 1&1 hosting workaround to reduce false
+	  positives.
+
+2015-05-01 13:53  donncha
+
+	* wp-cache.php: Check if it's an array to avoid PHP warning
+
+2015-05-01 13:51  donncha
+
+	* wp-cache-phase2.php: Added some extra debugging
+
+2015-04-29 16:55  kraftbj
+
+	* readme.txt: Condense changelog to keep it nice and short :)
+
+2015-04-29 15:58  kraftbj
+
+	* readme.txt: Update changelog to keep pace with trunk.
+
+2015-04-29 15:45  donncha
+
+	* wp-cache-phase1.php, wp-cache-phase2.php: Check if mb_strlen()
+	  exists before WordPress loads so it doesn't use the limited
+	  mb_strlen compat function in WordPress 4.2. Ref:
+	  https://wordpress.org/support/topic/421-initial-blank-page-load?replies=11
+
+2015-04-28 15:53  kraftbj
+
+	* readme.txt: Add previous commits to readme.txt as a running
+	  changelog to make it easier to compile for next release.
+
+2015-04-28 15:24  kraftbj
+
+	* wp-cache.php: Preload Cron E-mail Updates
+
+2015-04-28 15:17  kraftbj
+
+	* wp-cache.php: Preload only public post types. See
+	  https://github.com/Automattic/wp-super-cache/pull/18
+
+2015-04-21 18:22  kraftbj
+
+	* readme.txt: Tested to tag bump to 4.2
+
+2015-04-07 16:00  donncha
+
+	* wp-cache-phase2.php: Don't disable supercache caching on CRON
+	  requests. Fixes problems clearing front page cache on scheduled
+	  posts
+
+2015-04-04 22:57  donncha
+
+	* wp-cache-phase1.php: Fix the log_message, finally. Props
+	  webaware.
+
+2015-04-04 12:17  donncha
+
+	* Changelog.txt: Updated changelog
+
 2015-04-04 12:13  donncha
 
 	* readme.txt: Updated changelog
diff --git a/wp-content/plugins/wp-super-cache/advanced-cache.php b/wp-content/plugins/wp-super-cache/advanced-cache.php
index 10e7fb100..f7718b07f 100644
--- a/wp-content/plugins/wp-super-cache/advanced-cache.php
+++ b/wp-content/plugins/wp-super-cache/advanced-cache.php
@@ -5,8 +5,14 @@ function wpcache_broken_message() {
 	if ( isset( $wp_cache_config_file ) == false )
 		return '';
 
-	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
+	$doing_ajax =     defined( 'DOING_AJAX' ) && DOING_AJAX;
+	$xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST;
+	$rest_request =   defined( 'REST_REQUEST' ) && REST_REQUEST;
+
+	$skip_output = ( $doing_ajax || $xmlrpc_request || $rest_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. -->";
+	}
 }
 
 if ( false == defined( 'WPCACHEHOME' ) ) {
diff --git a/wp-content/plugins/wp-super-cache/ossdl-cdn.php b/wp-content/plugins/wp-super-cache/ossdl-cdn.php
index 40452004e..60e7c15b4 100644
--- a/wp-content/plugins/wp-super-cache/ossdl-cdn.php
+++ b/wp-content/plugins/wp-super-cache/ossdl-cdn.php
@@ -148,7 +148,7 @@ function scossdl_off_options() {
 	$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';
 	?>
-		<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="http://knowledgelayer.softlayer.com/questions/365/How+does+Origin+Pull+work%3F" 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>
 		<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="">
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 2f350a5f9..7babbebd4 100644
--- a/wp-content/plugins/wp-super-cache/plugins/domain-mapping.php
+++ b/wp-content/plugins/wp-super-cache/plugins/domain-mapping.php
@@ -41,7 +41,7 @@ function domain_mapping_supercachedir( $dir ) {
 
 	$protocol = ( isset( $_SERVER['HTTPS' ] ) && 'on' == strtolower( $_SERVER['HTTPS' ] ) ) ? 'https://' : 'http://';
 	$siteurl = str_replace( $protocol, '', $siteurl );
-	return $cache_path . 'supercache/' . $siteurl;
+	return trailingslashit( $cache_path . 'supercache/' . $siteurl );
 }
 
 function domain_mapping_actions() {
diff --git a/wp-content/plugins/wp-super-cache/readme.txt b/wp-content/plugins/wp-super-cache/readme.txt
index ffd71262a..dbeca174f 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
+Contributors: donncha, automattic, kraftbj
 Tags: performance,caching,wp-cache,wp-super-cache,cache
-Tested up to: 4.2.2
-Stable tag: 1.4.4
+Tested up to: 4.5.2
+Stable tag: 1.4.8
 Requires at least: 3.0
 
 A very fast caching engine for WordPress that produces static html files.
@@ -46,7 +46,7 @@ If you are not using legacy mode caching consider deleting the contents of the "
 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.
 
-See the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) for further information. [Developer documentation](http://ocaoimh.ie/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](http://z9.io/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.
 
@@ -58,10 +58,36 @@ The cache directory, usually wp-content/cache/ is only for temporary files. Do n
 
 == Upgrade Notice ==
 
-= 1.4.4 =
-Security release fixing an XSS bug in the settings page, and fix for fatal error in output handler.
+= 1.4.8 =
+Removed malware URL in a code comment.
 
 == Changelog ==
+
+= 1.4.8 =
+* Removed malware URL in a code comment. (harmless to operation of plugin but gets flagged by A/V software)
+* Updated translation file.
+
+= 1.4.7 =
+* Update the settings page for WordPress 4.4. layout changes.
+
+= 1.4.6 =
+* Generate the file cache/.htaccess even when one exists so gzip rules are created and gzipped pages are served correctly. Props Tigertech. https://wordpress.org/support/topic/all-website-pages-downloading-gz-file-after-latest-update?replies=36#post-7494087
+
+= 1.4.5 =
+* Enhancement: Only preload public post types. Props webaware.
+* Added an uninstall function that deletes the config file. Deactivate function doesn't delete it any more.
+* Possible to deactivate the plugin without visiting the settings page now.
+* Fixed the cache rebuild system. Rebuild files now survive longer than the request that generate them.
+* Minor optimisations: prune_super_cache() exits immediately if the file doesn't exist. The output of wp_cache_get_cookies_values() is now cached.
+* Added PHP pid to the debug log to aid debugging.
+* Various small bug fixes.
+* Fixed reset of expiry time and GC settings when updating advanced settings.
+* Removed CacheMeta class to avoid APC errors. It's not used any more.
+* Fixed reset of advanced settings when using "easy" settings page.
+* Fixed XSS in settings page.
+* Hide cache files when servers display directory indexes.
+* Prevent PHP object injection through use of serialize().
+
 = 1.4.4 =
 * Fixed fatal error in output handler if GET parameters present in query. Props webaware.
 * Fixed debug log. It wasn't logging the right message.
@@ -409,7 +435,7 @@ There are 2 ways of doing this. You can use Javascript to draw the part of the p
 
 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://ocaoimh.ie/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](http://z9.io/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? =
@@ -427,7 +453,7 @@ WordPress deletes the plugin folder when it updates a plugin. This is the same w
 
 = 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 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://ocaoimh.ie/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](http://z9.io/2009/01/23/wp-super-cache-089/) for more.
 
 = Why doesn't the plugin cache requests by search engine bots by default? =
 
@@ -452,7 +478,7 @@ Try the Cacheability Engine at http://www.ircache.net/cgi-bin/cacheability.py or
 
 = 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://ocaoimh.ie/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](http://z9.io/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! =
 
@@ -556,13 +582,13 @@ 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://ocaoimh.ie/no-adverts-for-friends/) plugin.
+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.
 
 == Updates ==
-Updates to the plugin will be posted here, to [Holy Shmoly!](http://ocaoimh.ie/) and the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) will always link to the newest version.
+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
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 b846eabb5..fcc6940f8 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-base.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-base.php
@@ -1,15 +1,6 @@
 <?php
 $known_headers = array("Last-Modified", "Expires", "Content-Type", "Content-type", "X-Pingback", "ETag", "Cache-Control", "Pragma");
 
-if (!class_exists('CacheMeta')) {
-	class CacheMeta {
-		var $dynamic = false;
-		var $headers = array();
-		var $uri = '';
-		var $post = 0;
-	}
-}
-
 $WPSC_HTTP_HOST = htmlentities( $_SERVER[ 'HTTP_HOST' ] );
 
 // We want to be able to identify each blog in a WordPress MU install
@@ -21,7 +12,7 @@ if ( defined( 'VHOST' ) || ( defined( 'WP_ALLOW_MULTISITE' ) && constant( 'WP_AL
 	} else {
 		if ( isset( $base ) == false )
 			$base = '';
-		$request_uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) );
+		$request_uri = str_replace( '..', '', preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $_SERVER['REQUEST_URI'] ) );
 		if( strpos( $request_uri, '/', 1 ) ) {
 			if( $base == '/' ) {
 				$blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 );
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 f1a1391d4..ed529b13a 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-phase1.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-phase1.php
@@ -111,8 +111,8 @@ function wp_super_cache_init() {
 	$key = $blogcacheid . md5( $wp_cache_key );
 	$wp_cache_key = $blogcacheid . $wp_cache_key;
 
-	$cache_filename = $file_prefix . $key . '.html';
-	$meta_file = $file_prefix . $key . '.meta';
+	$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 );
 	return compact( 'key', 'cache_filename', 'meta_file', 'cache_file', 'meta_pathname' );
@@ -131,13 +131,13 @@ function wp_cache_serve_cache_file() {
 	}
 
 	if ( $wp_cache_no_cache_for_get && false == empty( $_GET ) ) {
-		wp_cache_debug( "Non empty GET request. Caching disabled on settings page. " . serialize( $_GET ), 1 );
+		wp_cache_debug( "Non empty GET request. Caching disabled on settings page. " . json_encode( $_GET ), 1 );
 		return false;
 	}
 
 	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. " . serialize( $_GET ), 1 );
+			wp_cache_debug( "Non empty GET request. Not serving request from object cache. " . json_encode( $_GET ), 1 );
 			return false;
 		}
 
@@ -148,14 +148,14 @@ function wp_cache_serve_cache_file() {
 			$meta_filename .= ".gz";
 		}
 		$cache = wp_cache_get( $oc_key, 'supercache' );
-		$meta = unserialize( wp_cache_get( $meta_filename, 'supercache' ) );
+		$meta = json_decode( wp_cache_get( $meta_filename, 'supercache' ), true );
 		if ( is_array( $meta ) == false ) {
 			wp_cache_debug( "Meta array from object cache corrupt. Ignoring cache.", 1 );
 			return true;
 		}
 	} elseif ( file_exists( $cache_file ) ) {
 		wp_cache_debug( "wp-cache file exists: $cache_file", 5 );
-		if ( !( $meta = unserialize( @file_get_contents( $meta_pathname) ) ) ) {
+		if ( !( $meta = json_decode( wp_cache_get_legacy_cache( $meta_pathname ), true ) ) ) {
 			wp_cache_debug( "couldn't load wp-cache meta file", 5 );
 			return true;
 		}
@@ -173,7 +173,7 @@ function wp_cache_serve_cache_file() {
 			wp_cache_debug( "No Super Cache file found for current URL: $file" );
 			return false;
 		} elseif ( false == empty( $_GET ) ) {
-			wp_cache_debug( "GET array not empty. Cannot serve a supercache file. " . serialize( $_GET ) );
+			wp_cache_debug( "GET array not empty. Cannot serve a supercache file. " . json_encode( $_GET ) );
 			return false;
 		} elseif ( wp_cache_get_cookies_values() != '' ) {
 			wp_cache_debug( "Cookies found. Cannot serve a supercache file. " . wp_cache_get_cookies_values() );
@@ -232,7 +232,7 @@ function wp_cache_serve_cache_file() {
 			if ( $wp_cache_mfunc_enabled == 0 && $wp_supercache_304 ) {
 				if ( function_exists( 'apache_request_headers' ) ) {
 					$request = apache_request_headers();
-					$remote_mod_time = $request[ 'If-Modified-Since' ];
+					$remote_mod_time = ( isset ( $request[ 'If-Modified-Since' ] ) ) ? $request[ 'If-Modified-Since' ] : 0;
 				} else {
 					if ( isset( $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ] ) )
 						$remote_mod_time = $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ];
@@ -294,7 +294,7 @@ function wp_cache_serve_cache_file() {
 			wp_cache_debug( "Serving wp-cache dynamic file", 5 );
 			if ( $ungzip ) {
 				// attempt to uncompress the cached file just in case it's gzipped
-				$cache = file_get_contents( $cache_file );
+				$cache = wp_cache_get_legacy_cache( $cache_file );
 				$uncompressed = @gzuncompress( $cache );
 				if ( $uncompressed ) {
 					wp_cache_debug( "Uncompressed gzipped cache file from wp-cache", 1 );
@@ -304,12 +304,12 @@ function wp_cache_serve_cache_file() {
 					echo do_cacheaction( 'wpsc_cachedata', $cache );
 				}
 			} else {
-				echo do_cacheaction( 'wpsc_cachedata', file_get_contents( $cache_file ) );
+				echo do_cacheaction( 'wpsc_cachedata', wp_cache_get_legacy_cache( $cache_file ) );
 			}
 		} else {
 			wp_cache_debug( "Serving wp-cache static file", 5 );
 			if ( $ungzip ) {
-				$cache = file_get_contents( $cache_file );
+				$cache = wp_cache_get_legacy_cache( $cache_file );
 				$uncompressed = gzuncompress( $cache );
 				if ( $uncompressed ) {
 					wp_cache_debug( "Uncompressed gzipped cache file from wp-cache", 1 );
@@ -318,7 +318,7 @@ function wp_cache_serve_cache_file() {
 					echo $cache;
 				}
 			} else {
-				readfile( $cache_file );
+				echo( wp_cache_get_legacy_cache( $cache_file ) );
 			}
 		}
 		wp_cache_debug( "exit request", 5 );
@@ -326,6 +326,10 @@ function wp_cache_serve_cache_file() {
 	}
 }
 
+function wp_cache_get_legacy_cache( $cache_file ) {
+	return substr( @file_get_contents( $cache_file ), 15 );
+}
+
 if(defined('DOING_CRON')) {
 	extract( wp_super_cache_init() );
 	return true;
@@ -357,7 +361,13 @@ function wp_cache_late_loader() {
 }
 
 function wp_cache_get_cookies_values() {
-	$string = '';
+	static $string = '';
+
+	if ( $string != '' ) {
+		wp_cache_debug( "wp_cache_get_cookies_values: cached: $string" );
+		return $string;
+	}
+
 	$regex = "/^wp-postpass|^comment_author_";
 	if ( defined( 'LOGGED_IN_COOKIE' ) )
 		$regex .= "|^" . preg_quote( constant( 'LOGGED_IN_COOKIE' ) );
@@ -375,6 +385,10 @@ function wp_cache_get_cookies_values() {
 
 	// If you use this hook, make sure you update your .htaccess rules with the same conditions
 	$string = do_cacheaction( 'wp_cache_get_cookies_values', $string );
+	if ( $string != '' )
+		$string = md5( $string );
+
+	wp_cache_debug( "wp_cache_get_cookies_values: return: $string", 5 );
 	return $string;
 }
 
@@ -506,11 +520,11 @@ function wp_cache_debug( $message, $level = 1 ) {
 		return false;
 
 	// Log message: Date URI Message
-	$log_messase = date('H:i:s') . " {$_SERVER['REQUEST_URI']} {$message}\n\r";
+	$log_message = date('H:i:s') . " " . getmypid() . " {$_SERVER['REQUEST_URI']} {$message}\n\r";
 	// path to the log file in the cache folder
 	$log_file = $cache_path . str_replace('/', '', str_replace('..', '', $wp_cache_debug_log));
 
-	error_log( $message, 3, $log_file );
+	error_log( $log_message, 3, $log_file );
 }
 
 function wp_cache_user_agent_is_rejected() {
@@ -535,7 +549,7 @@ function get_supercache_dir( $blog_id = 0 ) {
 	} else {
 		$home = get_blog_option( $blog_id, 'home' );
 	}
-	return apply_filters( 'wp_super_cache_supercachedir', $cache_path . 'supercache/' . trailingslashit( strtolower( preg_replace( '/:.*$/', '', str_replace( 'http://', '', str_replace( 'https://', '', $home ) ) ) ) ) );
+	return trailingslashit( apply_filters( 'wp_super_cache_supercachedir', $cache_path . 'supercache/' . trailingslashit( strtolower( preg_replace( '/:.*$/', '', str_replace( 'http://', '', str_replace( 'https://', '', $home ) ) ) ) ) ) );
 }
 function get_current_url_supercache_dir( $post_id = 0 ) {
 	global $cached_direct_pages, $cache_path, $wp_cache_request_uri, $WPSC_HTTP_HOST, $wp_cache_home_path;
@@ -566,13 +580,10 @@ function get_current_url_supercache_dir( $post_id = 0 ) {
 					$uri = '';
 				}
 			} else {
-				if ( isset( $_SERVER[ 'HTTPS' ] ) )
-					$protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';
-				else
-					$protocol = 'http://';
-				wp_cache_debug( "get_current_url_supercache_dir: Removing SERVER_NAME ({$WPSC_HTTP_HOST}) and $protocol from permalink ($permalink). Is the url right?", 1 );
+				wp_cache_debug( "get_current_url_supercache_dir: Removing SERVER_NAME ({$WPSC_HTTP_HOST}) from permalink ($permalink). Is the url right?", 1 );
 				$uri = str_replace( $WPSC_HTTP_HOST, '', $permalink );
-				$uri = str_replace( $protocol, '', $uri );
+				$uri = str_replace( 'http://', '', $uri );
+				$uri = str_replace( 'https://', '', $uri );
 			}
 		} else {
 			$uri = str_replace( $site_url, '', $permalink );
@@ -582,8 +593,7 @@ function get_current_url_supercache_dir( $post_id = 0 ) {
 	} else {
 		$uri = strtolower( $wp_cache_request_uri );
 	}
-	$uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '/index.php', '/', str_replace( '..', '', preg_replace("/(\?.*)?$/", '', $uri ) ) ) );
-	$uri = str_replace( '\\', '', $uri );
+	$uri = wpsc_deep_replace( array( '..', '\\', 'index.php', ), preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', preg_replace( "/(\?.*)?$/", '', $uri ) ) );
 	$dir = preg_replace( '/:.*$/', '',  $WPSC_HTTP_HOST ) . $uri; // To avoid XSS attacks
 	if ( function_exists( "apply_filters" ) ) {
 		$dir = apply_filters( 'supercache_dir', $dir );
@@ -594,7 +604,7 @@ function get_current_url_supercache_dir( $post_id = 0 ) {
 	if( is_array( $cached_direct_pages ) && in_array( $_SERVER[ 'REQUEST_URI' ], $cached_direct_pages ) ) {
 		$dir = ABSPATH . $uri . '/';
 	}
-	$dir = str_replace( '//', '/', $dir );
+	$dir = str_replace( '..', '', str_replace( '//', '/', $dir ) );
 	wp_cache_debug( "supercache dir: $dir", 5 );
 	if ( $DONOTREMEMBER == 0 )
 		$saved_supercache_dir[ $post_id ] = $dir;
@@ -602,7 +612,11 @@ function get_current_url_supercache_dir( $post_id = 0 ) {
 }
 
 function get_all_supercache_filenames( $dir = '' ) {
-	global $wp_cache_mobile_enabled;
+	global $wp_cache_mobile_enabled, $cache_path;
+
+	$dir = realpath( $dir );
+	if ( substr( $dir, 0, strlen( $cache_path ) ) != $cache_path )
+		return array();
 
 	$filenames = array( 'index.html', 'index-https.html', 'index.html.php' );
 
@@ -696,4 +710,33 @@ function wp_supercache_cache_for_admins() {
 	}
 }
 
+/* returns true/false depending on location of $dir. */
+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"
+	) {
+		return false;
+	} else {
+		return true;
+	}
+}
+
+// copy of _deep_replace() to be used before WordPress loads
+function wpsc_deep_replace( $search, $subject ) {
+	$subject = (string) $subject;
+
+	$count = 1;
+	while ( $count ) {
+		$subject = str_replace( $search, '', $subject, $count );
+	}
+
+	return $subject;
+}
+
 ?>
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 e5f835815..1a33fb59b 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache-phase2.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache-phase2.php
@@ -51,8 +51,8 @@ function wp_cache_phase2() {
 		return false;
 	}
 
-	if ( !empty( $_GET ) ) {
-		wp_cache_debug( 'Supercache caching disabled. Only using wp-cache. Non empty GET request. ' . serialize( $_GET ), 5 );
+	if ( !empty( $_GET ) && !defined( "DOING_CRON" ) ) {
+		wp_cache_debug( 'Supercache caching disabled. Only using wp-cache. Non empty GET request. ' . json_encode( $_GET ), 5 );
 		$super_cache_enabled = false;
 	}
 
@@ -75,14 +75,18 @@ function wp_cache_phase2() {
 }
 
 function wpcache_do_rebuild( $dir ) {
+	global $do_rebuild_list;
 	$dir = trailingslashit( $dir );
+	if ( isset( $do_rebuild_list[ $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' ) )
 			continue;
 		$mtime = @filemtime($cache_file . '.needs-rebuild');
-		if( $mtime && (time() - $mtime) < 30 ) {
+		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 );
 		}
@@ -239,7 +243,7 @@ function wp_super_cache_query_vars() {
 }
 
 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;
+	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;
 	$buffer = apply_filters( 'wp_cache_ob_callback_filter', $buffer );
 
 	$script = basename($_SERVER['PHP_SELF']);
@@ -250,7 +254,7 @@ function wp_cache_ob_callback( $buffer ) {
 		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' ) ) {
-		wp_cache_debug( "Non empty GET request. Caching disabled on settings page. " . serialize( $_GET ), 1 );
+		wp_cache_debug( "Non empty GET request. Caching disabled on settings page. " . json_encode( $_GET ), 1 );
 		$cache_this_page = false;
 	} elseif ( $_SERVER["REQUEST_METHOD"] == 'POST' || !empty( $_POST ) || get_option( 'gzipcompression' ) ) {
 		wp_cache_debug( 'Not caching POST request.', 5 );
@@ -310,6 +314,18 @@ function wp_cache_ob_callback( $buffer ) {
 		wp_cache_shutdown_callback();
 		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 );
+					}
+				}
+			}
+		}
 		return wp_cache_maybe_dynamic( $buffer );
 	}
 }
@@ -540,7 +556,7 @@ function wp_cache_get_ob(&$buffer) {
 		if ( $fr ) { // legacy caching
 			wp_cache_debug( "Writing dynamic buffer to legacy file." );
 			wp_cache_add_to_buffer( $buffer, "Dynamic Legacy Super Cache" );
-			fputs( $fr, $buffer );
+			fputs( $fr, '<?php die(); ?>' . $buffer );
 		} elseif ( isset( $fr2 ) ) { // supercache active
 			wp_cache_debug( "Writing dynamic buffer to supercache file." );
 			wp_cache_add_to_buffer( $buffer, "Dynamic Super Cache" );
@@ -570,7 +586,7 @@ function wp_cache_get_ob(&$buffer) {
 			// Return uncompressed data & store compressed for later use
 			if ( $fr ) {
 				wp_cache_debug( "Writing gzipped buffer to wp-cache cache file.", 5 );
-				fputs($fr, $gzdata);
+				fputs($fr, '<?php die(); ?>' . $gzdata);
 			} elseif ( $cache_enabled && $wp_cache_object_cache ) {
 				wp_cache_set( $oc_key . ".gz", $gzdata, 'supercache', $cache_max_time ); 
 				$added_cache = 1;
@@ -582,7 +598,7 @@ function wp_cache_get_ob(&$buffer) {
 				$added_cache = 1;
 			} elseif ( $fr ) {
 				wp_cache_debug( "Writing non-gzipped buffer to wp-cache cache file." );
-				fputs($fr, $buffer);
+				fputs($fr, '<?php die(); ?>' . $buffer);
 			}
 		}
 		if ( $fr2 ) {
@@ -674,14 +690,21 @@ function wp_cache_phase2_clean_cache($file_prefix) {
 
 	if( !wp_cache_writers_entry() )
 		return false;
-	wp_cache_debug( "Cleaning cache in $blog_cache_dir", 3 );
-	if ( ( $handle = @opendir( $blog_cache_dir ) ) ) { 
+	wp_cache_debug( "wp_cache_phase2_clean_cache: Cleaning cache in $blog_cache_dir" );
+	if ( $handle = @opendir( $blog_cache_dir ) ) { 
 		while ( false !== ($file = @readdir($handle))) {
-			if ( preg_match("/^$file_prefix/", $file) ) {
-				$meta = unserialize( file_get_contents( $blog_cache_dir . 'meta/' . $file ) );
-				if ( $meta[ 'blog_id' ] == $wpdb->blogid ) {
-					@unlink( $blog_cache_dir . $file );
+			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" );
+					@unlink( $blog_cache_dir . $file);
 					@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
+				} else {
+					$meta = json_decode( wp_cache_get_legacy_cache( $blog_cache_dir . 'meta/' . $file ), true );
+					if ( $meta[ 'blog_id' ] == $wpdb->blogid ) {
+						@unlink( $blog_cache_dir . $file );
+						@unlink( $blog_cache_dir . 'meta/' . $file );
+					}
 				}
 			}
 		}
@@ -694,12 +717,23 @@ function prune_super_cache( $directory, $force = false, $rename = false ) {
 	global $cache_max_time, $cache_path, $cache_rebuild_files, $blog_cache_dir;
 	static $log = 0;
 
+	if ( false == @file_exists( $directory ) ) {
+		wp_cache_debug( "prune_super_cache: exiting as file/dir does not exist: $directory" );
+		return $log;
+	}
 	if( !isset( $cache_max_time ) )
 		$cache_max_time = 3600;
 
 	$now = time();
 
-	$protected_directories = array( $cache_path . '.htaccess', $cache_path . $blog_cache_dir . 'meta', $cache_path . 'supercache' );
+	$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' );
 
 	$oktodelete = false;
 	if (is_dir($directory)) {
@@ -734,14 +768,18 @@ function prune_super_cache( $directory, $force = false, $rename = false ) {
 							wp_cache_debug( "gc: deleted $entry, older than $cache_max_time seconds", 2 );
 						}
 					}
+				} elseif ( in_array( $entry, $protected_directories ) ) {
+					wp_cache_debug( "gc: could not delete $entry as it's protected.", 2 );
 				}
 			}
 			closedir($dh);
 		}
 	} elseif( is_file($directory) && ($force || @filemtime( $directory ) + $cache_max_time <= $now ) ) {
 		$oktodelete = true;
-		if( in_array( $directory, $protected_directories ) )
+		if ( in_array( $directory, $protected_directories ) ) {
+			wp_cache_debug( "gc: could not delete $directory as it's protected.", 2 );
 			$oktodelete = false;
+		}
 		if( $oktodelete && !$rename ) {
 			wp_cache_debug( "prune_super_cache: deleted $directory", 5 );
 			@unlink( $directory );
@@ -750,7 +788,11 @@ function prune_super_cache( $directory, $force = false, $rename = false ) {
 			wp_cache_debug( "prune_super_cache: wp_cache_rebuild_or_delete( $directory )", 5 );
 			wp_cache_rebuild_or_delete( $directory );
 			$log++;
+		} else {
+			wp_cache_debug( "prune_super_cache: did not delete file: $directory" );
 		}
+	} else {
+			wp_cache_debug( "prune_super_cache: did not delete file as it wasn't a directory or file and not forced to delete new file: $directory" );
 	}
 	return $log;
 }
@@ -762,7 +804,7 @@ function wp_cache_rebuild_or_delete( $file ) {
 	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 to {$file}.needs-rebuild", 2 );
+			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 );
@@ -781,18 +823,19 @@ function wp_cache_phase2_clean_expired( $file_prefix, $force = false ) {
 		return false;
 	$now = time();
 	wp_cache_debug( "Cleaning expired cache files in $blog_cache_dir", 2 );
+	$deleted = 0;
 	if ( ( $handle = @opendir( $blog_cache_dir ) ) ) { 
 		while ( false !== ($file = readdir($handle))) {
 			if ( preg_match("/^$file_prefix/", $file) && 
 				(@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( "Deleting $blog_cache_dir{$file} (plus meta)", 5 );
+				wp_cache_debug( "wp_cache_phase2_clean_expired: Deleting obsolete legacy cache+meta files: $file" );
 				continue;
 			}
 			if($file != '.' && $file != '..') {
 				if( is_dir( $blog_cache_dir . $file ) == false && (@filemtime($blog_cache_dir . $file) + $cache_max_time) <= $now  ) {
-					if( substr( $file, -9 ) != '.htaccess' ) {
+					if ( substr( $file, -9 ) != '.htaccess' && $file != 'index.html' ) {
 						@unlink($blog_cache_dir . $file);
 						wp_cache_debug( "Deleting $blog_cache_dir{$file}, older than $cache_max_time seconds", 5 );
 					}
@@ -875,7 +918,7 @@ function wp_cache_shutdown_callback() {
 			$wp_cache_meta[ 'headers' ][ 'Vary' ] = 'Vary: Accept-Encoding, Cookie';
 		}
 
-		$serial = serialize($wp_cache_meta);
+		$serial = '<?php die(); ?>' . json_encode( $wp_cache_meta );
 		if( wp_cache_writers_entry() ) {
 			wp_cache_debug( "Writing meta file: {$blog_cache_dir}meta/{$meta_file}", 2 );
 			if ( false == $wp_cache_object_cache ) {
@@ -1046,7 +1089,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' ) {
-		wp_cache_debug( "wp_cache_post_edit: draft post, not deleting any cache files.", 4 );
+		wp_cache_debug( "wp_cache_post_edit: draft post, not deleting any cache files. status: " . $post->post_status, 4 );
 		return $post_id;
 	}
 
@@ -1076,9 +1119,9 @@ function wp_cache_post_id_gc( $siteurl, $post_id, $all = 'all' ) {
 	if( $post_id == 0 )
 		return;
 
-	$permalink = trailingslashit( str_replace( get_option( 'home' ), '', post_permalink( $post_id ) ) );
+	$permalink = trailingslashit( str_replace( get_option( 'home' ), '', get_permalink( $post_id ) ) );
 	$dir = get_current_url_supercache_dir( $post_id );
-	wp_cache_debug( "wp_cache_post_id_gc post_id: $post_id " . post_permalink( $post_id ) . " clearing cache in $dir.", 4 );
+	wp_cache_debug( "wp_cache_post_id_gc post_id: $post_id " . get_permalink( $post_id ) . " clearing cache in $dir.", 4 );
 	if ( $all == 'all' ) {
 		prune_super_cache( $dir, true, true );
 		do_action( 'gc_cache', 'prune', $permalink );
@@ -1131,70 +1174,87 @@ function wp_cache_post_change( $post_id ) {
 	if ( $wp_cache_object_cache )
 		reset_oc_version();
 
-	$permalink = trailingslashit( str_replace( get_option( 'siteurl' ), '', post_permalink( $post_id ) ) );
+	$permalink = trailingslashit( str_replace( get_option( 'siteurl' ), '', get_permalink( $post_id ) ) );
 	if( $super_cache_enabled ) {
 		$dir = get_supercache_dir();
-		$siteurl = trailingslashit( strtolower( preg_replace( '/:.*$/', '', str_replace( 'http://', '', get_option( 'home' ) ) ) ) );
+		$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 );
 		if ( $all == true ) {
-			wp_cache_debug( "Post change: deleting cache files in " . $cache_path . 'supercache/' . $siteurl, 4 );
+			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 ); 
 			}
 			do_action( 'gc_cache', 'prune', 'homepage' );
+		} else {
+			wp_cache_debug( "wp_cache_post_change: not deleting all pages.", 4 );
 		}
 		if( $all == true && get_option( 'show_on_front' ) == 'page' ) {
 			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 );
 			wp_cache_post_id_gc( $siteurl, get_option( 'page_on_front' ), 'single' );
-			$permalink = trailingslashit( str_replace( get_option( 'home' ), '', post_permalink( get_option( 'page_for_posts' ) ) ) );
+			$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 ); 
 			}
 			do_action( 'gc_cache', 'prune', $permalink );
+		} else {
+			wp_cache_debug( "wp_cache_post_change: not deleting front static page.", 4 );
 		}
 	}
 
-	$matches = array();
-	if ( ($handle = @opendir( $blog_cache_dir . 'meta/' )) ) { 
+	wp_cache_debug( "wp_cache_post_change: checking {$blog_cache_dir}meta/", 4 );
+	$supercache_files_deleted = false;
+	if ( $handle = @opendir( $blog_cache_dir ) ) { 
 		while ( false !== ($file = readdir($handle))) {
-			if ( preg_match("/^({$file_prefix}{$blogcacheid}.*)\.meta/", $file, $matches) ) {
-				$meta_pathname = $blog_cache_dir . 'meta/' . $file;
-				$content_pathname = $blog_cache_dir . $matches[1] . ".html";
-				$meta = unserialize(@file_get_contents($meta_pathname));
-				if( false == is_array( $meta ) ) {
-					wp_cache_debug( "Post change cleaning up stray file: $content_pathname", 4 );
-					@unlink($meta_pathname);
-					@unlink($content_pathname);
+			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" );
+					@unlink( $blog_cache_dir . $file);
+					@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
 					continue;
-				}
-				if ($post_id > 0 && $meta) {
-					$permalink = trailingslashit( str_replace( get_option( 'home' ), '', post_permalink( $post_id ) ) );
-					if ( $meta[ 'blog_id' ] == $blog_id  && ( ( $all == true && !$meta[ 'post' ] ) || $meta[ 'post' ] == $post_id) ) {
-						wp_cache_debug( "Post change: deleting post cache files for {$meta[ 'uri' ]}: $content_pathname", 4 );
-						@unlink($meta_pathname);
-						@unlink($content_pathname);
-						if ( $super_cache_enabled == true ) {
-							@prune_super_cache( $dir . $permalink, true, true );
-							do_action( 'gc_cache', 'rebuild', $permalink );
-						}
+				} else {
+					$meta = json_decode( wp_cache_get_legacy_cache( $blog_cache_dir . 'meta/' . $file ), true );
+					if( false == is_array( $meta ) ) {
+						wp_cache_debug( "Post change cleaning up stray file: $file", 4 );
+						@unlink( $blog_cache_dir . 'meta/' . $file );
+						@unlink( $blog_cache_dir . $file );
+						continue;
 					}
-				} elseif ($meta[ 'blog_id' ] == $blog_id) {
-					wp_cache_debug( "Post change: deleting cache files for {$meta[ 'uri' ]}: $content_pathname", 4 );
-					@unlink($meta_pathname);
-					@unlink($content_pathname);
-					if ( $super_cache_enabled == true ) {
-						$files_to_check = get_all_supercache_filenames( $dir . $meta[ 'uri' ] );
-						foreach( $files_to_check as $cache_file ) {
-							@wp_cache_rebuild_or_delete( $dir . trailingslashit( $meta[ 'uri' ] ) . $cache_file );
+					if ( $post_id > 0 && $meta ) {
+						$permalink = trailingslashit( str_replace( get_option( 'home' ), '', get_permalink( $post_id ) ) );
+						if ( $meta[ 'blog_id' ] == $blog_id  && ( ( $all == true && !$meta[ 'post' ] ) || $meta[ 'post' ] == $post_id) ) {
+							wp_cache_debug( "Post change: deleting post wp-cache files for {$meta[ 'uri' ]}: $file", 4 );
+							@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 );
+								}
+								$supercache_files_deleted = true;
+								do_action( 'gc_cache', 'rebuild', $permalink );
+							}
+						}
+					} elseif ( $meta[ 'blog_id' ] == $blog_id ) {
+						wp_cache_debug( "Post change: deleting wp-cache files for {$meta[ 'uri' ]}: $file", 4 );
+						@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 );
+							}
+							do_action( 'gc_cache', 'rebuild', trailingslashit( $meta[ 'uri' ] ) );
 						}
-						do_action( 'gc_cache', 'rebuild', trailingslashit( $meta[ 'uri' ] ) );
 					}
 				}
-
 			}
 		}
 		closedir($handle);
@@ -1284,7 +1344,7 @@ function wp_cache_gc_cron() {
 
 		$msg = "Hi,\n\nThe WP Super Cache Garbage Collector has now run, deleting " . (int)$num . " files and directories.\nIf you want to switch off these emails please see the WP Super Cache Advanced Settings\npage on your blog.\n\n{$msg}\nRegards,\nThe Garbage Collector.";
 
-		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] WP Super Cache GC Report', 'wp-super-cache' ), site_url() ), $msg );
+		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] WP Super Cache GC Report', 'wp-super-cache' ), home_url() ), $msg );
 	}
 	@unlink( $gc_flag );
 	wp_cache_debug( 'GC completed. GC flag deleted.', 5 );
diff --git a/wp-content/plugins/wp-super-cache/wp-cache.php b/wp-content/plugins/wp-super-cache/wp-cache.php
index 2224b7869..973cd7ed0 100644
--- a/wp-content/plugins/wp-super-cache/wp-cache.php
+++ b/wp-content/plugins/wp-super-cache/wp-cache.php
@@ -1,11 +1,11 @@
 <?php
 /*
 Plugin Name: WP Super Cache
-Plugin URI: http://wordpress.org/plugins/wp-super-cache/
+Plugin URI: https://wordpress.org/plugins/wp-super-cache/
 Description: Very fast caching plugin for WordPress.
-Version: 1.4.4
+Version: 1.4.8
 Author: Automattic
-Author URI: http://automattic.com/
+Author URI: https://automattic.com/
 License: GPL2+
 Text Domain: wp-super-cache
 */
@@ -113,16 +113,19 @@ function get_wpcachehome() {
 	}
 }
 
-function wpsupercache_deactivate() {
+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 ( file_exists( $file ) )
 			unlink( $file );
 	}
-	if( !function_exists( 'prune_super_cache' ) )
+	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);
+	prune_super_cache( $cache_path, true );
+	wp_cache_remove_index();
 	@unlink( $cache_path . '.htaccess' );
 	@unlink( $cache_path . 'meta' );
 	@unlink( $cache_path . 'supercache' );
@@ -130,10 +133,33 @@ function wpsupercache_deactivate() {
 	wp_clear_scheduled_hook( 'wp_cache_gc' );
 	wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
 	wp_cache_disable_plugin();
+	delete_site_option( 'wp_super_cache_index_detected' );
 }
-register_uninstall_hook( __FILE__, 'wpsupercache_deactivate' );
+register_uninstall_hook( __FILE__, 'wpsupercache_uninstall' );
+
+function wpsupercache_deactivate() {
+	global $wp_cache_config_file, $wp_cache_link, $cache_path;
+	if ( file_exists( $wp_cache_link ) )
+		unlink( $wp_cache_link );
+	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' );
+	wp_clear_scheduled_hook( 'wp_cache_check_site_hook' );
+	wp_clear_scheduled_hook( 'wp_cache_gc' );
+	wp_clear_scheduled_hook( 'wp_cache_gc_watcher' );
+	wp_cache_replace_line('^ *\$cache_enabled', '$cache_enabled = false;', $wp_cache_config_file);
+	wp_cache_disable_plugin( false ); // don't delete configuration file
+}
+register_deactivation_hook( __FILE__, 'wpsupercache_deactivate' );
 
 function wpsupercache_activate() {
+	wp_schedule_single_event( time() + 10, 'wp_cache_add_site_cache_index' );
 }
 register_activation_hook( __FILE__, 'wpsupercache_activate' );
 
@@ -216,7 +242,7 @@ function wp_cache_manager_error_checks() {
 			if( is_array( $cron ) ) {
 				if( $cron[ 'response' ][ 'code' ] == '404' ) {
 					?><div id="message" class="updated fade"><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 the correct operation of garbage collection by this plugin, WordPress scheduled posts as well as other critical activities.', 'wp-super-cache' ); ?></p>
+					<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>
 					<?php
@@ -252,11 +278,11 @@ function wp_cache_manager_error_checks() {
 		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>
-		<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 webserver to make any changes.', 'wp-super-cache' ), WP_CONTENT_DIR ); ?>
+		<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( 'Readonly:', 'wp-super-cache' ); ?> <code>chmod 644 <?php echo WP_CONTENT_DIR; ?>/wp-cache-config.php</code></p>
+		<?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' ) ) {
 		define( "SUBMITDISABLED", ' ' );
@@ -375,7 +401,7 @@ function wp_cache_manager_error_checks() {
 	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>
-		<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>
+		<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" />
 		<input type="hidden" name="page" value="wpsupercache" />
@@ -396,7 +422,11 @@ function admin_bar_delete_page() {
 	if ( function_exists('current_user_can') && false == current_user_can('delete_others_posts') )
 		return false;
 	if ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'delcachepage' && ( isset( $_GET[ '_wpnonce' ] ) ? wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'delete-cache' ) : false ) ) {
-		$path = trailingslashit( get_supercache_dir() . preg_replace( '/:.*$/', '', $_GET[ 'path' ] ) );
+		$path = realpath( trailingslashit( get_supercache_dir() . str_replace( '..', '', preg_replace( '/:.*$/', '', $_GET[ 'path' ] ) ) ) ) . '/';
+		if ( $path == '/' )
+			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 );
@@ -432,6 +462,8 @@ function wp_cache_manager_updates() {
 			$_POST[ 'super_cache_enabled' ] = 2; // PHP
 			$_POST[ 'cache_rebuild_files' ] = 1;
 			unset( $_POST[ 'cache_compression' ] );
+			if ( $cache_path != WP_CONTENT_DIR . '/cache/' )
+				$_POST[ 'wp_cache_location' ] = $cache_path;
 			//
 			// set up garbage collection with some default settings
 			if ( ( !isset( $wp_cache_shutdown_gc ) || $wp_cache_shutdown_gc == 0 ) && false == wp_next_scheduled( 'wp_cache_gc' ) ) {
@@ -453,9 +485,31 @@ function wp_cache_manager_updates() {
 			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' );
+		foreach( $advanced_settings as $setting ) {
+			if ( isset( $$setting ) && $$setting == 1 ) {
+				$_POST[ $setting ] = 1;
+			}
+		}
 	}
 
 	if( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'scupdates' ) {
+		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/';
+			else
+				$dir = trailingslashit( $dir ) . wpsc_deep_replace( array( '..', '\\' ), basename( $_POST[ 'wp_cache_location' ] ) );
+			$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_replace_line('^ *\$cache_path', "\$cache_path = '" . $cache_path . "';", $wp_cache_config_file);
+		}
 
 		if( isset( $_POST[ 'wp_super_cache_late_init' ] ) ) {
 			$wp_super_cache_late_init = 1;
@@ -700,6 +754,9 @@ jQuery(document).ready(function(){
 	border-bottom: 1px solid #ccc;
 	padding-bottom: 0;
 }
+table.wpsc-settings-table {
+	clear: both;
+}
 </style>
 <?php
 	echo '<a name="top"></a>';
@@ -749,7 +806,7 @@ jQuery(document).ready(function(){
 		update_cached_mobile_ua_list( $wp_cache_mobile_browsers, $wp_cache_mobile_prefixes, $mobile_groups );
 	}
 
-	?> <table><td valign='top'><?php
+	?> <table class="wpsc-settings-table"><td valign='top'><?php
 	switch( $_GET[ 'tab' ] ) {
 		case "cdn":
 		scossdl_off_options();
@@ -947,8 +1004,8 @@ jQuery(document).ready(function(){
 				<fieldset>
 				<legend class="hidden">Caching</legend>
 				<label><input type='checkbox' name='wp_cache_status' value='all' <?php if ( $cache_enabled == true ) { echo 'checked=checked'; } ?>> <?php _e( 'Cache hits to this website for quick access.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br /><br />
-				<label><input type='radio' name='super_cache_enabled' <?php if( $super_cache_enabled ) echo "checked"; ?> value='1'> <?php printf( __( 'Use mod_rewrite to serve cache files.', 'wp-super-cache' ), 'http://wordpress.org/plugins/wordpress-mobile-edition/' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
-				<label><input type='radio' name='super_cache_enabled' <?php if( $wp_cache_mod_rewrite == 0 ) echo "checked"; ?> value='2'> <?php printf( __( 'Use PHP to serve cache files.', 'wp-super-cache' ), 'http://wordpress.org/plugins/wordpress-mobile-edition/' ); ?></label><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>
@@ -962,7 +1019,7 @@ jQuery(document).ready(function(){
 				<legend class="hidden">Miscellaneous</legend>
 				<?php if ( false == defined( 'WPSC_DISABLE_COMPRESSION' ) ) { ?>
 					<?php if ( false == function_exists( 'gzencode' ) ) { ?>
-						<em><?php _e( 'Warning! Compression is disabled as gzencode() function not found.', 'wp-super-cache' ); ?></em><br />
+						<em><?php _e( 'Warning! Compression is disabled as gzencode() function was not found.', 'wp-super-cache' ); ?></em><br />
 					<?php } else { ?>
 						<label><input type='checkbox' name='cache_compression' <?php if( $cache_compression ) echo "checked"; ?> value='1'> <?php _e( 'Compress pages so they&#8217;re served more quickly to visitors.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br />
 						<em><?php _e( 'Compression is disabled by default because some hosts have problems with compressed files. Switching it on and off clears the cache.', 'wp-super-cache' ); ?></em><br />
@@ -973,10 +1030,10 @@ jQuery(document).ready(function(){
 					$disable_304 = false;
 				if ( $disable_304 )
 					echo "<strike>";
-				?><label><input <?php if ( $disable_304 ) { echo "disabled"; } ?> type='checkbox' name='wp_supercache_304' <?php if( $wp_supercache_304 ) echo "checked"; ?> value='1'> <?php _e( '304 Not Modified browser caching. Indicate when a page has not been modified since last requested.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br /><?php
+				?><label><input <?php if ( $disable_304 ) { echo "disabled"; } ?> type='checkbox' name='wp_supercache_304' <?php if( $wp_supercache_304 ) echo "checked"; ?> value='1'> <?php _e( '304 Not Modified browser caching. Indicate when a page has not been modified since it was last requested.', 'wp-super-cache' ); echo " <em>(" . __( "Recommended", "wp-super-cache" ) . ")</em>"; ?></label><br /><?php
 				if ( $disable_304 ) {
 					echo "</strike>";
-					echo "<p><strong>" . __( 'Warning! 304 browser caching is only supported when not using mod_rewrite caching.', 'wp-super-cache' ) . "</strong></p>";
+					echo "<p><strong>" . __( 'Warning! 304 browser caching is only supported when mod_rewrite caching is not used.', 'wp-super-cache' ) . "</strong></p>";
 				} else {
 					?><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
 				}
@@ -1012,15 +1069,44 @@ jQuery(document).ready(function(){
 				?><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
 			}?>
 			<?php printf( __( '<strong>DO NOT CACHE PAGE</strong> secret key: <a href="%s">%s</a>', 'wp-super-cache' ), trailingslashit( get_bloginfo( 'url' ) ) . "?donotcachepage={$cache_page_secret}", $cache_page_secret ); ?>
-				</legend>
+				</fieldset>
+			</td>
+		</tr>
+		<tr valign="top">
+			<th scope="row"><label for="wp_cache_location"><?php _e( 'Cache Location', 'wp-super-cache' ); ?></label></th>
+			<td>
+				<fieldset>
+					<legend class="hidden">Cache Location</legend>
+					<input type='text' size=80 name='wp_cache_location' value='<?php echo esc_attr( $cache_path ); ?>' />
+					<p><?php printf( __( 'Change the location of your cache files. The default is WP_CONTENT_DIR . /cache/ which translates to %s.', 'wp-super-cache' ), WP_CONTENT_DIR . '/cache/' ); ?></p>
+					<ol><li><?php _e( 'You must give the full path to the directory.', 'wp-super-cache' ); ?></li>
+						<li><?php _e( '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.', 'wp-super-cache' ); ?></li>
+						<li><?php _e( '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.', 'wp-super-cache' ); ?></li>
+						<li><?php _e( 'Submit a blank entry to set it to the default directory, WP_CONTENT_DIR . /cache/.', 'wp-super-cache' ); ?></li>
+						<?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.' );
+							} 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>';
+							}
+							echo "<li>$msg</li>";
+						} ?>
+
+
+						<?php if ( $super_cache_enabled && $wp_cache_mod_rewrite == 1 ) { ?>
+						<li><?php printf( __( '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.', 'wp-super-cache' ), ABSPATH ); ?></li>
+						<?php } ?>
+					</ol>
+					<p><?php _e( '', 'wp-super-cache' ); ?></p>
 				</fieldset>
 			</td>
 		</tr>
 		</table>
 		<h3><?php _e( 'Note:', 'wp-super-cache' ); ?></h3>
 		<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 too is probably a good idea!)', 'wp-super-cache' ), WP_CONTENT_DIR ); ?></li>
+		<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
 		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>";
@@ -1069,7 +1155,7 @@ jQuery(document).ready(function(){
 			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 or 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: 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 "<div class='submit'><input class='button-primary' type='submit' " . SUBMITDISABLED . " value='" . __( 'Update Status', 'wp-super-cache' ) . "' /></div></form>";
@@ -1158,7 +1244,7 @@ jQuery(document).ready(function(){
 				echo '</form>';
 			}
 			echo "<h3>" . __( "Delete Cached Pages", 'wp-super-cache' ) . "</h3>";
-			echo "<p>" . __( "Cached pages are stored on your server as html and PHP files. If you need to delete them use the button below.", 'wp-super-cache' ) . "</p>";
+			echo "<p>" . __( "Cached pages are stored on your server as html and PHP files. If you need to delete them, use the button below.", 'wp-super-cache' ) . "</p>";
 			echo '<form name="wp_cache_content_delete" action="?page=wpsupercache&tab=contents" method="post">';
 			echo '<input type="hidden" name="wp_delete_cache" />';
 			echo '<div class="submit"><input id="deletepost" class="button-secondary" type="submit" ' . SUBMITDISABLED . 'value="' . __( 'Delete Cache', 'wp-super-cache' ) . ' " /></div>';
@@ -1176,7 +1262,7 @@ jQuery(document).ready(function(){
 			<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>
 			<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( __( '<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> <a href="%s">Speed up your site with Caching and cache-control</a> explains how to make your site more cacheable with .htaccess rules.', 'wp-super-cache' ), 'http://www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html' ); ?></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>
@@ -1234,7 +1320,7 @@ jQuery(document).ready(function(){
 function wpsc_plugins_tab() {
 	echo '<p>' . __( '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.', 'wp-super-cache' ) . '</p>';
 	echo '<p>' . __( 'This is strictly an advanced feature only and knowledge of both PHP and WordPress actions is required to create them.', 'wp-super-cache' ) . '</p>';
-	echo '<p>' . __( '<strong>Warning</strong>! Due to the way WordPress upgrades plugins the plugins you upload to wp-super-cache/plugins/ will be deleted when you upgrade WP Super Cache. You can avoid this by loading the plugins from elsewhere. Set <strong>$wp_cache_plugins_dir</strong> to the new location in wp-config.php and WP Super Cache will look there instead.<br />More info available in the <a href="http://ocaoimh.ie/wp-super-cache-developers/">developer documentation</a>.', 'wp-super-cache' ) . '</p>';
+	echo '<p>' . __( '<strong>Warning</strong>! Due to the way WordPress upgrades plugins, the plugins you upload to wp-super-cache/plugins/ will be deleted when you upgrade WP Super Cache. You can avoid this by loading the plugins from elsewhere. Set <strong>$wp_cache_plugins_dir</strong> to the new location in wp-config.php and WP Super Cache will look there instead.<br />More info available in the <a href="http://ocaoimh.ie/wp-super-cache-developers/">developer documentation</a>.', 'wp-super-cache' ) . '</p>';
 	ob_start();
 	if( defined( 'WP_CACHE' ) ) {
 		if( function_exists( 'do_cacheaction' ) ) {
@@ -1314,7 +1400,7 @@ function wsc_mod_rewrite() {
 	$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>";
+		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 );
@@ -1323,7 +1409,7 @@ function wsc_mod_rewrite() {
 		echo "</fieldset>";
 		$dohtaccess = false;
 	} elseif( 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 "<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.
@@ -1352,10 +1438,10 @@ function wsc_mod_rewrite() {
 		echo "<p><pre>" . esc_html( $rules ) . "</pre></p>\n</div>";
 	} else {
 		?>
-		<p><?php printf( __( '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.', 'wp-super-cache' ), $home_path ); ?></p>
+		<p><?php printf( __( '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.', 'wp-super-cache' ), $home_path ); ?></p>
 		<?php
 		if ( $rules != $scrules ) {
-			?><p style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><?php _e( '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 should compare the rules in the file with those below as soon as possible. Click the &#8217;Update Mod_Rewrite Rules&#8217; button to update the rules.', 'wp-super-cache' ); ?></p><?php
+			?><p style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><?php _e( '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 should compare the rules in the file with those below as soon as possible. Click the &#8217;Update Mod_Rewrite Rules&#8217; button to update the rules.', 'wp-super-cache' ); ?></p><?php
 		}
 		?><a href="javascript:toggleLayer('rewriterules');" class="button"><?php _e( 'View Mod_Rewrite Rules', 'wp-super-cache' ); ?></a><?php
 		wpsc_update_htaccess_form();
@@ -1368,10 +1454,8 @@ function wsc_mod_rewrite() {
 		echo '</div>';
 	}
 	// http://allmybrain.com/2007/11/08/making-wp-super-cache-gzip-compression-work/
-	if( !is_file( $cache_path . '.htaccess' ) ) {
-		$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>";
-	}
+	$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
 }
@@ -1459,7 +1543,7 @@ function wp_lock_down() {
 		if( substr( $page, 0, 1 ) != '/' )
 			$page = '/' . $page;
 		$page = esc_sql( $page );
-		if( in_array( $page, $cached_direct_pages ) == false ) {
+		if ( false == is_array( $cached_direct_pages ) || in_array( $page, $cached_direct_pages ) == false ) {
 			$cached_direct_pages[] = $page;
 			$out .= "'$page', ";
 		}
@@ -1486,8 +1570,11 @@ function wp_lock_down() {
 	}
 
 	if( $valid_nonce && array_key_exists('deletepage', $_POST) && $_POST[ 'deletepage' ] ) {
-		$page = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_POST['deletepage']) );
-		$pagefile = ABSPATH . $page . 'index.html';
+		$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 ) ) {
+			die( __( 'Cannot delete directory', 'wp-super-cache' ) );
+		}
 		$firstfolder = explode( '/', $page );
 		$firstfolder = ABSPATH . $firstfolder[1];
 		$page = ABSPATH . $page;
@@ -1503,7 +1590,7 @@ function wp_lock_down() {
 	$readonly = '';
 	if( !is_writeable_ACLSafe( ABSPATH ) ) {
 		$readonly = 'READONLY';
-		?><p style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><strong><?php _e( 'Warning!', 'wp-super-cache' ); ?></strong> <?php printf( __( 'You must make %s writable to enable this feature. As this is a security risk please make it readonly after your page is generated.', 'wp-super-cache' ), ABSPATH ); ?></p><?php
+		?><p style='padding:0 8px;color:#9f6000;background-color:#feefb3;border:1px solid #9f6000;'><strong><?php _e( 'Warning!', 'wp-super-cache' ); ?></strong> <?php printf( __( '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.', 'wp-super-cache' ), ABSPATH ); ?></p><?php
 	} else {
 		$abspath_stat = stat(ABSPATH . '/');
 		$abspath_mode = decoct( $abspath_stat[ 'mode' ] & 0777 );
@@ -1568,66 +1655,70 @@ function wp_cache_edit_max_time () {
 
 	$timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
 
-	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);
-	}
-
-	if( !isset( $cache_scheduled_time ) ) {
-		$cache_scheduled_time = '00:00';
-		wp_cache_replace_line('^ *\$cache_scheduled_time', "\$cache_scheduled_time = '$cache_scheduled_time';", $wp_cache_config_file);
-	}
-
-	if( !isset( $cache_max_time ) ) {
-		$cache_max_time = 3600;
-		wp_cache_replace_line('^ *\$cache_max_time', "\$cache_max_time = $cache_max_time;", $wp_cache_config_file);
-	}
-
-	if ( !isset( $cache_time_interval ) ) {
-		$cache_time_interval = $cache_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 ) {
-		$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
-		if ( false == wp_next_scheduled( 'wp_cache_gc_watcher' ) )
-			wp_schedule_event( time()+600, 'hourly', 'wp_cache_gc_watcher' );
-	}
-
-	if ( isset( $_POST[ 'cache_gc_email_me' ] ) && $valid_nonce ) {
-		$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 ) {
-		$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 ) {
-		wp_clear_scheduled_hook( 'wp_cache_gc' );
-		$cache_schedule_type = 'interval';
-		if ( (int)$_POST[ 'cache_time_interval' ] == 0 )
-			$_POST[ 'cache_time_interval' ] = 600;
-		$cache_time_interval = (int)$_POST[ 'cache_time_interval' ];
-		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
-		wp_clear_scheduled_hook( 'wp_cache_gc' );
-		$cache_schedule_type = 'time';
-		if ( !isset( $_POST[ 'cache_scheduled_time' ] ) || $_POST[ 'cache_scheduled_time' ] == '' )
-			$_POST[ 'cache_scheduled_time' ] = '00:00';
-		$cache_scheduled_time = $_POST[ 'cache_scheduled_time' ];
-		$schedules = wp_get_schedules();
-		if ( !isset( $cache_schedule_interval ) )
-			$cache_schedule_interval = 'daily';
-		if ( 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);
-		wp_cache_replace_line('^ *\$cache_scheduled_time', "\$cache_scheduled_time = '$cache_scheduled_time';", $wp_cache_config_file);
-		wp_schedule_event( strtotime( $cache_scheduled_time ), $cache_schedule_interval, 'wp_cache_gc' );
+	if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] == 'expirytime' ) {
+
+		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);
+		}
+
+		if( !isset( $cache_scheduled_time ) ) {
+			$cache_scheduled_time = '00:00';
+			wp_cache_replace_line('^ *\$cache_scheduled_time', "\$cache_scheduled_time = '$cache_scheduled_time';", $wp_cache_config_file);
+		}
+
+		if( !isset( $cache_max_time ) ) {
+			$cache_max_time = 3600;
+			wp_cache_replace_line('^ *\$cache_max_time', "\$cache_max_time = $cache_max_time;", $wp_cache_config_file);
+		}
+
+		if ( !isset( $cache_time_interval ) ) {
+			$cache_time_interval = $cache_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 ) {
+			$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
+			if ( false == wp_next_scheduled( 'wp_cache_gc_watcher' ) )
+				wp_schedule_event( time()+600, 'hourly', 'wp_cache_gc_watcher' );
+		}
+
+		if ( isset( $_POST[ 'cache_gc_email_me' ] ) && $valid_nonce ) {
+			$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 ) {
+			$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 ) {
+			wp_clear_scheduled_hook( 'wp_cache_gc' );
+			$cache_schedule_type = 'interval';
+			if ( (int)$_POST[ 'cache_time_interval' ] == 0 )
+				$_POST[ 'cache_time_interval' ] = 600;
+			$cache_time_interval = (int)$_POST[ 'cache_time_interval' ];
+			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
+			wp_clear_scheduled_hook( 'wp_cache_gc' );
+			$cache_schedule_type = 'time';
+			if ( !isset( $_POST[ 'cache_scheduled_time' ] ) || $_POST[ 'cache_scheduled_time' ] == '' )
+				$_POST[ 'cache_scheduled_time' ] = '00:00';
+			$cache_scheduled_time = $_POST[ 'cache_scheduled_time' ];
+			$schedules = wp_get_schedules();
+			if ( !isset( $cache_schedule_interval ) )
+				$cache_schedule_interval = 'daily';
+			if ( 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);
+			wp_cache_replace_line('^ *\$cache_scheduled_time', "\$cache_scheduled_time = '$cache_scheduled_time';", $wp_cache_config_file);
+			wp_schedule_event( strtotime( $cache_scheduled_time ), $cache_schedule_interval, 'wp_cache_gc' );
+		}
 	}
+
 	?><fieldset class="options">
 	<a name='expirytime'></a>
 	<h3><?php _e( 'Expiry Time &amp; Garbage Collection', 'wp-super-cache' ); ?></h3><?php
@@ -1659,6 +1750,7 @@ function wp_cache_edit_max_time () {
 		});";
 	echo "</script>";
 	echo '<form name="wp_edit_max_time" action="#expirytime" method="post">';
+	echo '<input name="action" value="expirytime" type="hidden" />';
 	echo '<table class="form-table">';
 	echo '<tr><td><label for="wp_max_time"><strong>' . __( 'Cache Timeout', 'wp-super-cache' ) . '</strong></label></td>';
 	echo "<td><input type='text' id='wp_max_time' size=6 name='wp_max_time' value='$cache_max_time' /> " . __( "seconds", 'wp-super-cache' ) . "</td></tr>\n";
@@ -1683,7 +1775,7 @@ function wp_cache_edit_max_time () {
 	echo "<li>" . __( '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.', 'wp-super-cache' ) . "</li>\n";
 	echo "<li>" . __( 'Use the <em>Timer</em> or <em>Clock</em> schedulers to define when the garbage collector should run.', 'wp-super-cache' ) . "</li>\n";
 	echo "<li>" . __( '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.', 'wp-super-cache' ) . "</li>\n";
-	echo "<li>" . __( 'Or, the <em>Clock</em> scheduler allows the garbage collection to run at specific times. If set to run hourly or twicedaily the garbage collector will be first scheduled for the time you enter here. It will then run again at the indicated interval. If set to run daily it will run once a day at the time specified.', 'wp-super-cache' ) . "</li>\n";
+	echo "<li>" . __( '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 will be first scheduled for the time you enter here. It will then run again at the indicated interval. If set to run daily, it will run once a day at the time specified.', 'wp-super-cache' ) . "</li>\n";
 	echo "</ol>";
 	echo "<p>" . __( '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.', 'wp-super-cache' ) . "</p>\n";
 	echo "<ol>";
@@ -1692,7 +1784,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. 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>" . __( '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');
@@ -1891,7 +1983,7 @@ function wp_cache_debug_settings() {
 	echo "<p>" . __( '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 minutes to verify that your site is ok if you&#8217;re worried. You will be emailed if there is a problem.', 'wp-super-cache' ) . "</p>";
 	echo "<table class='form-table'>";
 	echo "<tr><td valign='top' colspan='2'><input type='checkbox' name='wp_super_cache_front_page_check' value='1' " . checked( 1, $wp_super_cache_front_page_check, false ) . " /> " . __( 'Check front page every 5 minutes.', 'wp-super-cache' ) . "</td></tr>";
-	echo "<tr><td valign='top'>" . __( 'Front page text', 'wp-super-cache' ) . "</td><td> <input type='text' size='30' name='wp_super_cache_front_page_text' value='{$wp_super_cache_front_page_text}' /> (" . __( 'Text to search for on your front page. If this text is missing the cache will be cleared. Leave blank to disable.', 'wp-super-cache' ) . ")</td></tr>";
+	echo "<tr><td valign='top'>" . __( 'Front page text', 'wp-super-cache' ) . "</td><td> <input type='text' size='30' name='wp_super_cache_front_page_text' value='{$wp_super_cache_front_page_text}' /> (" . __( 'Text to search for on your front page. If this text is missing, the cache will be cleared. Leave blank to disable.', 'wp-super-cache' ) . ")</td></tr>";
 	echo "<tr><td valign='top' colspan='2'><input type='checkbox' name='wp_super_cache_front_page_clear' value='1' " . checked( 1, $wp_super_cache_front_page_clear, false ) . " /> " . __( 'Clear cache on error.', 'wp-super-cache' ) . "</td></tr>";
 	echo "<tr><td valign='top' colspan='2'><input type='checkbox' name='wp_super_cache_front_page_notification' value='1' " . checked( 1, $wp_super_cache_front_page_notification, false ) . " /> " . __( 'Email the blog admin when checks are made. (useful for testing)', 'wp-super-cache' ) . "</td></tr>";
 
@@ -1907,7 +1999,7 @@ function wp_cache_enable() {
 	global $wp_cache_config_file, $cache_enabled, $supercachedir;
 
 	if(get_option('gzipcompression')) {
-		echo "<strong>" . __( 'Error: GZIP compression is enabled, disable it if you want to enable wp-cache.', 'wp-super-cache' ) . "</strong>";
+		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) ) {
@@ -2013,6 +2105,163 @@ function wp_cache_replace_line($old, $new, $my_file) {
 	return true;
 }
 
+function wp_cache_remove_index() {
+	global $cache_path;
+	@unlink( $cache_path . "index.html" );
+	@unlink( $cache_path . "supercache/index.html" );
+	@unlink( $cache_path . "blogs/index.html" );
+	if ( is_dir( $cache_path . "blogs" ) ) {
+		$dir = new DirectoryIterator( $cache_path . "blogs" );
+		foreach( $dir as $fileinfo ) {
+			if ( $fileinfo->isDot() ) {
+				continue;
+			}
+			if ( $fileinfo->isDir() ) {
+				$directory = $cache_path . "blogs/" . $fileinfo->getFilename();
+				if ( is_file( $directory . "/index.html" ) ) {
+					unlink( $directory . "/index.html" );
+				}
+				if ( is_dir( $directory . "/meta" ) ) {
+					if ( is_file( $directory . "/meta/index.html" ) ) {
+						unlink( $directory . "/index.html" );
+					}
+				}
+			}
+		}
+	}
+}
+
+function wp_cache_index_notice() {
+	global $current_user, $wp_version, $wp_cache_not_logged_in, $cache_path;
+
+	if ( false == wpsupercache_site_admin() )
+		return false;
+	if ( false == get_site_option( 'wp_super_cache_index_detected' ) )
+		return false;
+
+	if ( strlen( $cache_path ) < strlen( ABSPATH )
+		|| ABSPATH != substr( $cache_path, 0, strlen( ABSPATH ) ) )
+		return false; // cache stored outside web root
+
+	if ( get_site_option( 'wp_super_cache_index_detected' ) == 2 ) {
+		update_site_option( 'wp_super_cache_index_detected', 3 );
+		echo "<div class='error' style='padding: 10px 10px 50px 10px'>";
+		echo "<h1>" . __( 'WP Super Cache Warning!', 'wp-super-cache' ) . '</h1>';
+		echo '<p>' . __( 'All users of this site have been logged out to refresh their login cookies.', 'wp-super-cache' ) . '</p>';
+		echo '</div>';
+		return false;
+	} 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><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>";
+		if ( -1 == version_compare( $wp_version, '4.0' ) ) {
+			echo '<p>' . __( '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.', 'wp-super-cache' ) . '</p>';
+		} else {
+			echo '<p>' . __( '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.', 'wp-super-cache' ) . '</p>';
+		}
+		echo "<a id='wpsc-dismiss' href='#'>" . __( 'Dismiss', 'wp-super-cache' ) . "</a>";
+		if ( 1 == version_compare( $wp_version, '4.0' ) ) {
+			echo "	| <a href='" . wp_nonce_url( admin_url( '?action=wpsclogout' ), 'wpsc_logout' ) . "'>" . __( 'Logout', 'wp-super-cache' ) . "</a>";
+		}
+		echo "</div>";
+?>
+		<script  type='text/javascript'>
+		<!--
+			jQuery(document).ready(function(){
+				jQuery('#wpsc-dismiss').click(function() {
+						jQuery.ajax({
+							type: "post",url: "admin-ajax.php",data: { action: 'wpsc-index-dismiss', _ajax_nonce: '<?php echo wp_create_nonce( 'wpsc-index-dismiss' ); ?>' },
+							beforeSend: function() {jQuery("#wpsc-index-warning").fadeOut('slow');},
+						});
+				})
+			})
+		//-->
+		</script>
+<?php
+	}
+}
+add_action( 'admin_notices', 'wp_cache_index_notice' );
+
+function wpsc_dismiss_indexhtml_warning() {
+		check_ajax_referer( "wpsc-index-dismiss" );
+		update_site_option( 'wp_super_cache_index_detected', 3 );
+		die();
+}
+add_action( 'wp_ajax_wpsc-index-dismiss', 'wpsc_dismiss_indexhtml_warning' );
+
+function wp_cache_logout_all() {
+	global $current_user;
+	if ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'wpsclogout' && wp_verify_nonce( $_GET[ '_wpnonce' ], 'wpsc_logout' ) ) {
+		$user_id = $current_user->ID;
+		WP_Session_Tokens::destroy_all_for_all_users();
+		wp_set_auth_cookie( $user_id, false, is_ssl() );
+		update_site_option( 'wp_super_cache_index_detected', 2 );
+		wp_redirect( admin_url() );
+	}
+}
+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;
+
+	if ( is_dir( $cache_path ) && false == is_file( "$cache_path/index.html" ) ) {
+		$page = wp_remote_get( home_url( "/wp-content/cache/" ) );
+		if ( false == is_wp_error( $page ) ) {
+			if ( false == get_site_option( 'wp_super_cache_index_detected' )
+				&& $page[ 'response' ][ 'code' ] == 200
+				&& stripos( $page[ 'body' ], 'index of' ) ) {
+				add_site_option( 'wp_super_cache_index_detected', 1 ); // only show this once
+			}
+		}
+		insert_with_markers( $cache_path . '.htaccess', "INDEX", array( 'Options -Indexes' ) );
+	}
+
+	$directories = array( $cache_path, $cache_path . '/supercache/', $cache_path . '/blogs/', $blog_cache_dir, $blog_cache_dir . "/meta" );
+	foreach( $directories as $dir ) {
+		if ( false == is_dir( $dir ) )
+			@mkdir( $dir );
+		if ( is_dir( $dir ) && false == is_file( "$dir/index.html" ) ) {
+			$fp = @fopen( "$dir/index.html", 'w' );
+			if ( $fp )
+				fclose( $fp );
+		}
+	}
+}
+
+function wp_cache_add_site_cache_index() {
+	global $cache_path;
+
+	wp_cache_add_index_protection(); // root and supercache
+
+	if ( is_dir( $cache_path . "blogs" ) ) {
+		$dir = new DirectoryIterator( $cache_path . "blogs" );
+		foreach( $dir as $fileinfo ) {
+			if ( $fileinfo->isDot() ) {
+				continue;
+			}
+			if ( $fileinfo->isDir() ) {
+				$directory = $cache_path . "blogs/" . $fileinfo->getFilename();
+				if ( false == is_file( $directory . "/index.html" ) ) {
+					$fp = @fopen( $directory . "/index.html", 'w' );
+					if ( $fp )
+						fclose( $fp );
+				}
+				if ( is_dir( $directory . "/meta" ) ) {
+					if ( false == is_file( $directory . "/meta/index.html" ) ) {
+						$fp = @fopen( $directory . "/meta/index.html", 'w' );
+						if ( $fp )
+							fclose( $fp );
+					}
+				}
+			}
+		}
+	}
+}
+
 function wp_cache_verify_cache_dir() {
 	global $cache_path, $blog_cache_dir, $blogcacheid;
 
@@ -2041,6 +2290,7 @@ function wp_cache_verify_cache_dir() {
 	if( false == is_dir( $blog_cache_dir . 'meta' ) )
 		@mkdir( $blog_cache_dir . 'meta' );
 
+	wp_cache_add_index_protection();
 	return true;
 }
 
@@ -2057,18 +2307,18 @@ function wp_cache_verify_config_file() {
 			if( is_writeable_ACLSafe( $wp_cache_config_file ) ) {
 				@unlink( $wp_cache_config_file );
 			} else {
-				echo "<strong>" . __( 'Error', 'wp-super-cache' ) . ":</strong> " . sprintf( __( '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.', 'wp-super-cache' ), $wp_cache_config_file );
+				echo "<strong>" . __( 'Error', 'wp-super-cache' ) . ":</strong> " . sprintf( __( '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.', 'wp-super-cache' ), $wp_cache_config_file );
 				return false;
 			}
 		}
 	} elseif( !is_writeable_ACLSafe($dir)) {
-		echo "<strong>" . __( 'Error', 'wp-super-cache' ) . ":</strong> " . sprintf( __( 'Configuration file missing and %1$s  directory (<strong>%2$s</strong>) is not writable by the Web server.Check its permissions.', 'wp-super-cache' ), WP_CONTENT_DIR, $dir );
+		echo "<strong>" . __( 'Error', 'wp-super-cache' ) . ":</strong> " . sprintf( __( 'Configuration file missing and %1$s  directory (<strong>%2$s</strong>) is not writable by the web server. Check its permissions.', 'wp-super-cache' ), WP_CONTENT_DIR, $dir );
 		return false;
 	}
 
 	if ( !file_exists($wp_cache_config_file) ) {
 		if ( !file_exists($wp_cache_config_file_sample) ) {
-			echo "<strong>" . __( 'Error', 'wp-super-cache' ) . ":</strong> " . sprintf( __( 'Sample WP-Cache config file (<strong>%s</strong>) does not exist.Verify you installation.', 'wp-super-cache' ), $wp_cache_config_file_sample );
+			echo "<strong>" . __( 'Error', 'wp-super-cache' ) . ":</strong> " . sprintf( __( 'Sample WP-Cache config file (<strong>%s</strong>) does not exist. Verify your installation.', 'wp-super-cache' ), $wp_cache_config_file_sample );
 			return false;
 		}
 		copy($wp_cache_config_file_sample, $wp_cache_config_file);
@@ -2135,7 +2385,7 @@ 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 "<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 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>";
@@ -2162,7 +2412,7 @@ 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 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>";
 		} 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>";
@@ -2212,38 +2462,43 @@ function wp_cache_files() {
 	$count = 0;
 	$expired = 0;
 	$now = time();
-	if ( ($handle = @opendir( $blog_cache_dir . 'meta/' )) ) {
+	if ( ( $handle = @opendir( $blog_cache_dir ) ) ) {
 		$wp_cache_fsize = 0;
 		if ( $valid_nonce && isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deletewpcache' ) {
-			$deleteuri = preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '/index.php', '/', str_replace( '..', '', preg_replace("/(\?.*)?$/", '', base64_decode( $_GET[ 'uri' ] ) ) ) ) );
-			$deleteuri = str_replace( '\\', '', $deleteuri );
+			$deleteuri = wpsc_deep_replace( array( '..', '\\', 'index.php' ), preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', base64_decode( $_GET[ 'uri' ] ) ) );
 		} else {
 			$deleteuri = '';
 		}
 
 		if ( $valid_nonce && isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deletesupercache' ) {
-			$supercacheuri = preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '/index.php', '/', str_replace( '..', '', preg_replace("/(\?.*)?$/", '', base64_decode( $_GET[ 'uri' ] ) ) ) ) );
-			$supercacheuri = trailingslashit( str_replace( '\\', '', $supercacheuri ) );
-			printf( __( "Deleting supercache file: <strong>%s</strong><br />", 'wp-super-cache' ), $supercacheuri );
-			@unlink( $cache_path . 'supercache/' . $supercacheuri . 'index.html' );
-			@unlink( $cache_path . 'supercache/' . $supercacheuri . 'index.html.gz' );
-			prune_super_cache( $cache_path . 'supercache/' . $supercacheuri . 'page', true );
-			@rmdir( $cache_path . 'supercache/' . $supercacheuri );
-		}
-		while( false !== ($file = readdir($handle))) {
-			if ( preg_match("/^$file_prefix.*\.meta/", $file) ) {
-				$content_file = preg_replace("/meta$/", "html", $file);
+			$supercacheuri = wpsc_deep_replace( array( '..', '\\', 'index.php' ), preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', preg_replace("/(\?.*)?$/", '', base64_decode( $_GET[ 'uri' ] ) ) ) );
+			$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' );
+				prune_super_cache( $supercacheuri . 'page', true );
+				@rmdir( $supercacheuri );
+			}
+		}
+		while( false !== ( $file = readdir( $handle ) ) ) {
+			if ( strpos( $file, $file_prefix ) !== false && substr( $file, -4 ) == '.php' ) {
+				if ( false == file_exists( $blog_cache_dir . 'meta/' . $file ) ) {
+					@unlink( $blog_cache_dir . $file );
+					continue; // meta does not exist
+				}
 				$mtime = filemtime( $blog_cache_dir . 'meta/' . $file );
-				if ( ! ( $fsize = @filesize( $blog_cache_dir . $content_file ) ) )
-					continue; // .meta does not exists
+				$fsize = @filesize( $blog_cache_dir . $file );
+				if ( $fsize > 0 )
+					$fsize = $fsize - 15; // die() command takes 15 bytes at the start of the file
 
 				$age = $now - $mtime;
 				if ( $valid_nonce && isset( $_GET[ 'listfiles' ] ) ) {
-					$meta = unserialize( file_get_contents( $blog_cache_dir . 'meta/' . $file ) );
+					$meta = json_decode( wp_cache_get_legacy_cache( $blog_cache_dir . 'meta/' . $file ), true );
 					if ( $deleteuri != '' && $meta[ 'uri' ] == $deleteuri ) {
-						printf( __( "Deleting wp-cache file: <strong>%s</strong><br />", 'wp-super-cache' ), $deleteuri );
+						printf( __( "Deleting wp-cache file: <strong>%s</strong><br />", 'wp-super-cache' ), esc_html( $deleteuri ) );
 						@unlink( $blog_cache_dir . 'meta/' . $file );
-						@unlink( $blog_cache_dir . $content_file );
+						@unlink( $blog_cache_dir . $file );
 						continue;
 					}
 					$meta[ 'age' ] = $age;
@@ -2297,10 +2552,10 @@ function wp_cache_files() {
 		$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 && $_GET[ 'listfiles' ] )
+			if ( $valid_nonce && isset( $_GET[ 'listfiles' ] ) )
 				$sizes[ 'expired_list' ][ str_replace( $cache_path . 'supercache/' , '', $supercachedir ) ] = $now - $filem;
 		} else {
-			if ( $valid_nonce && $_GET[ 'listfiles' ] && $filem )
+			if ( $valid_nonce && isset( $_GET[ 'listfiles' ] ) && $filem )
 				$sizes[ 'cached_list' ][ str_replace( $cache_path . 'supercache/' , '', $supercachedir ) ] = $now - $filem;
 		}
 	}
@@ -2516,14 +2771,29 @@ function wp_cache_clean_cache( $file_prefix, $all = false ) {
 
 function wp_cache_clean_legacy_files( $dir, $file_prefix ) {
 	global $wpdb;
-	if ( $handle = @opendir( $dir . 'meta/' ) ) {
-		while ( false !== ($file = readdir($handle))) {
-			if ( preg_match( "/^$file_prefix/", $file ) ) {
-				$meta = unserialize( file_get_contents( $dir . 'meta/' . $file ) );
-				if ( ( defined( 'VHOST' ) || ( defined( 'WP_ALLOW_MULTISITE' ) && constant( 'WP_ALLOW_MULTISITE' ) == true ) ) && $meta[ 'blog_id' ] != $wpdb->blogid )
-					continue;
-				@unlink( $dir . 'meta/' . $file);
-				@unlink( $dir .  str_replace( '.meta', '.html', $file ) );
+
+	$dir = trailingslashit( $dir );
+	if ( @is_dir( $dir . 'meta' ) == false )
+		return false;
+
+	if ( $handle = @opendir( $dir ) ) {
+		while ( false !== ( $file = readdir( $handle ) ) ) {
+			if ( is_file( $dir . $file ) == false || $file == 'index.html' ) {
+				continue;
+			}
+
+			if ( strpos( $file, $file_prefix ) !== false ) {
+				if ( strpos( $file, '.html' ) ) {
+					// delete old legacy files immediately
+					@unlink( $dir . $file);
+					@unlink( $dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
+				} else {
+					$meta = json_decode( wp_cache_get_legacy_cache( $dir . 'meta/' . $file ), true );
+					if ( ( defined( 'VHOST' ) || ( defined( 'WP_ALLOW_MULTISITE' ) && constant( 'WP_ALLOW_MULTISITE' ) == true ) ) && $meta[ 'blog_id' ] != $wpdb->blogid )
+						continue;
+					@unlink( $dir . $file);
+					@unlink( $dir . 'meta/' . $file);
+				}
 			}
 		}
 		closedir($handle);
@@ -2551,14 +2821,17 @@ function wp_cache_clean_expired($file_prefix) {
 		return wp_cache_phase2_clean_expired($file_prefix);
 	}
 
-	$expr = "/^$file_prefix/";
 	$now = time();
-	if ( ($handle = @opendir( $blog_cache_dir )) ) {
-		while ( false !== ($file = readdir($handle))) {
-			if ( preg_match( $expr, $file )  &&
-				( filemtime( $blog_cache_dir . $file ) + $cache_max_time ) <= $now ) {
-				@unlink( $blog_cache_dir . $file );
-				@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
+	if ( $handle = @opendir( $blog_cache_dir ) ) {
+		while ( false !== ( $file = readdir( $handle ) ) ) {
+			if ( strpos( $file, $file_prefix ) !== false ) {
+				if ( strpos( $file, '.html' ) ) {
+					@unlink( $blog_cache_dir . $file);
+					@unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
+				} elseif ( ( filemtime( $blog_cache_dir . $file ) + $cache_max_time ) <= $now ) {
+					@unlink( $blog_cache_dir . $file );
+					@unlink( $blog_cache_dir . 'meta/' . $file );
+				}
 			}
 		}
 		closedir($handle);
@@ -2657,7 +2930,7 @@ function wp_cache_admin_notice() {
 add_action( 'admin_notices', 'wp_cache_admin_notice' );
 
 function wp_cache_check_site() {
-	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;
+	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, $wpdb;
 
 	if ( !isset( $wp_super_cache_front_page_check ) || ( isset( $wp_super_cache_front_page_check ) && $wp_super_cache_front_page_check == 0 ) ) {
 		return false;
@@ -2671,25 +2944,25 @@ function wp_cache_check_site() {
 		// Check for gzipped front page
                 if ( $front_page[ 'headers' ][ 'content-type' ] == 'application/x-gzip' ) {
                         if ( !isset( $wp_super_cache_front_page_clear ) || ( isset( $wp_super_cache_front_page_clear ) && $wp_super_cache_front_page_clear == 0 ) ) {
-                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is gzipped! Please clear cache!', 'wp-super-cache' ), site_url() ), sprintf( __( "Please visit %s to clear the cache as the front page of your site is now downloading!", 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache" ) );
+                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is gzipped! Please clear cache!', 'wp-super-cache' ), home_url() ), sprintf( __( "Please visit %s to clear the cache as the front page of your site is now downloading!", 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ) ) );
                         } else {
-                                wp_cache_clear_cache( get_current_blog_id() );
-                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is gzipped! Cache Cleared!', 'wp-super-cache' ), site_url() ), sprintf( __( "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.", 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache" ) );
+                                wp_cache_clear_cache( $wpdb->blogid );
+                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is gzipped! Cache Cleared!', 'wp-super-cache' ), home_url() ), sprintf( __( "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.", 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ) ) );
                         }
                 }
 
 		// Check for broken front page
 		if ( isset( $wp_super_cache_front_page_text ) && $wp_super_cache_front_page_text != '' && false === strpos( $front_page[ 'body' ], $wp_super_cache_front_page_text ) ) {
 			if ( !isset( $wp_super_cache_front_page_clear ) || ( isset( $wp_super_cache_front_page_clear ) && $wp_super_cache_front_page_clear == 0 ) ) {
-                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is not correct! Please clear cache!', 'wp-super-cache' ), site_url() ), sprintf( __( 'Please visit %1$s to clear the cache as the front page of your site is not correct and missing the text, "%2$s"!', 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache", $wp_super_cache_front_page_text ) );
+                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is not correct! Please clear cache!', 'wp-super-cache' ), home_url() ), sprintf( __( 'Please visit %1$s to clear the cache as the front page of your site is not correct and missing the text, "%2$s"!', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ), $wp_super_cache_front_page_text ) );
                         } else {
-                                wp_cache_clear_cache( get_current_blog_id() );
-                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is not correct! Cache Cleared!', 'wp-super-cache' ), site_url() ), sprintf( __( '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.', 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache", $wp_super_cache_front_page_text ) );
+                                wp_cache_clear_cache( $wpdb->blogid );
+                                wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is not correct! Cache Cleared!', 'wp-super-cache' ), home_url() ), sprintf( __( '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.', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ), $wp_super_cache_front_page_text ) );
 			}
 		}
 	}
 	if ( isset( $wp_super_cache_front_page_notification ) && $wp_super_cache_front_page_notification == 1 ) {
-		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page check!', 'wp-super-cache' ), site_url() ), sprintf( __( "WP Super Cache has checked the front page of your blog. Please visit %s if you would like to disable this.", 'wp-super-cache' ) . "\n\n", trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache#debug" ) . print_r( $front_page, 1 ) );
+		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page check!', 'wp-super-cache' ), home_url() ), sprintf( __( "WP Super Cache has checked the front page of your blog. Please visit %s if you would like to disable this.", 'wp-super-cache' ) . "\n\n", admin_url( 'options-general.php?page=wpsupercache' ) ) );
 	}
 
 	if ( !wp_next_scheduled( 'wp_cache_check_site_hook' ) ) {
@@ -2737,7 +3010,7 @@ function wpsc_update_htaccess_form( $short_form = true ) {
 	} 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 ) . " ";
-			_e( "You can edit the file yourself add the following rules.", 'wp-super-cache' );
+			_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 "<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>";
@@ -2774,7 +3047,7 @@ function wpsc_get_htaccess_info() {
 		$apache_root = '%{DOCUMENT_ROOT}';
 	}
 	$content_dir_root = $document_root;
-	if ( strpos( $document_root, '/kunden/' ) === 0 ) {
+	if ( strpos( $document_root, '/kunden/homepages/' ) === 0 ) {
 		// http://wordpress.org/support/topic/plugin-wp-super-cache-how-to-get-mod_rewrite-working-on-1and1-shared-hosting?replies=1
 		// On 1and1, PHP's directory structure starts with '/homepages'. The
 		// Apache directory structure has an extra '/kunden' before it.
@@ -2857,6 +3130,7 @@ function wpsc_get_htaccess_info() {
 	$gziprules .= "<IfModule mod_deflate.c>\n  SetEnvIfNoCase Request_URI \.gz$ no-gzip\n</IfModule>\n";
 	$gziprules .= "<IfModule mod_headers.c>\n  Header set Vary \"Accept-Encoding, Cookie\"\n  Header set Cache-Control 'max-age=3, must-revalidate'\n</IfModule>\n";
 	$gziprules .= "<IfModule mod_expires.c>\n  ExpiresActive On\n  ExpiresByType text/html A3\n</IfModule>\n";
+	$gziprules .= "Options -Indexes\n";
 	return array( "document_root" => $document_root, "apache_root" => $apache_root, "home_path" => $home_path, "home_root" => $home_root, "home_root_lc" => $home_root_lc, "inst_root" => $inst_root, "wprules" => $wprules, "scrules" => $scrules, "condition_rules" => $condition_rules, "rules" => $rules, "gziprules" => $gziprules );
 }
 
@@ -2877,7 +3151,6 @@ function clear_post_supercache( $post_id ) {
 
 function wp_cron_preload_cache() {
 	global $wpdb, $wp_cache_preload_interval, $wp_cache_preload_posts, $wp_cache_preload_email_me, $wp_cache_preload_email_volume, $cache_path, $wp_cache_preload_taxonomies;
-	global $WPSC_HTTP_HOST;
 
 	if ( get_option( 'preload_cache_stop' ) ) {
 		delete_option( 'preload_cache_stop' );
@@ -2909,7 +3182,7 @@ function wp_cron_preload_cache() {
 	update_option( 'preload_cache_counter', array( 'c' => ( $c + 100 ), 't' => time() ) );
 
 	if ( $wp_cache_preload_email_me && $c == 0 )
-		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Cache Preload Started', 'wp-super-cache' ), site_url(), '' ), ' ' );
+		wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Cache Preload Started', 'wp-super-cache' ), home_url(), '' ), ' ' );
 
 	if ( $wp_cache_preload_posts == 'all' || $c < $wp_cache_preload_posts ) {
 		wp_cache_debug( "wp_cron_preload_cache: doing taxonomy preload.", 5 );
@@ -2939,7 +3212,7 @@ function wp_cron_preload_cache() {
 				if ( count( $details ) != 1 && $details[ 0 ] != '' ) {
 					$rows = array_splice( $details, 0, 50 );
 					if ( $wp_cache_preload_email_me && $wp_cache_preload_email_volume == 'many' )
-						wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Refreshing %2$s taxonomy from %3$d to %4$d', 'wp-super-cache' ), site_url(), $taxonomy, $c, ($c+100) ), 'Refreshing: ' . print_r( $rows, 1 ) );
+						wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Refreshing %2$s taxonomy from %3$d to %4$d', 'wp-super-cache' ), home_url(), $taxonomy, $c, ($c+100) ), 'Refreshing: ' . print_r( $rows, 1 ) );
 					foreach( (array)$rows as $url ) {
 						set_time_limit( 60 );
 						if ( $url == '' )
@@ -2968,7 +3241,10 @@ function wp_cron_preload_cache() {
 	}
 
 	if ( $wp_cache_preload_posts == 'all' || $c < $wp_cache_preload_posts ) {
-		$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type != 'revision' AND post_type != 'nav_menu_item' ) AND post_status = 'publish' ORDER BY ID ASC LIMIT $c, 100" );
+		$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" );
 		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 );
@@ -2985,7 +3261,7 @@ function wp_cron_preload_cache() {
 			$page_on_front = $page_for_posts = 0;
 		}
 		if ( $wp_cache_preload_email_me && $wp_cache_preload_email_volume == 'many' )
-			wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Refreshing posts from %2$d to %3$d', 'wp-super-cache' ), site_url(), $c, ($c+100) ), ' ' );
+			wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Refreshing posts from %2$d to %3$d', 'wp-super-cache' ), home_url(), $c, ($c+100) ), ' ' );
 		$msg = '';
 		$count = $c + 1;
 		$permalink_counter_msg = $cache_path . "preload_permalink.txt";
@@ -3006,7 +3282,7 @@ function wp_cron_preload_cache() {
 				@unlink( $cache_path . "stop_preload.txt" );
 				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' ), site_url(), '' ), ' ' );
+					wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] Cache Preload Stopped', 'wp-super-cache' ), home_url(), '' ), ' ' );
 				return true;
 			}
 			$msg .= "$url\n";
@@ -3016,7 +3292,7 @@ function wp_cron_preload_cache() {
 			$count++;
 		}
 		if ( $wp_cache_preload_email_me && $wp_cache_preload_email_volume != 'less' )
-			wp_mail( get_option( 'admin_email' ), sprintf( __( '[%1$s] %2$d posts refreshed', 'wp-super-cache' ), $WPSC_HTTP_HOST, ($c+100) ), __( "Refreshed the following posts:", 'wp-super-cache' ) . "\n$msg" );
+			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 );
 			wp_schedule_single_event( time() + 30, 'wp_cache_preload_hook' );
@@ -3037,7 +3313,7 @@ function wp_cron_preload_cache() {
 			$cache_max_time = 86400; // fool the GC into expiring really old files
 		}
 		if ( $wp_cache_preload_email_me )
-			wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Cache Preload Completed', 'wp-super-cache' ), site_url() ), __( "Cleaning up old supercache files.", 'wp-super-cache' ) . "\n" . $msg );
+			wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Cache Preload Completed', 'wp-super-cache' ), home_url() ), __( "Cleaning up old supercache files.", 'wp-super-cache' ) . "\n" . $msg );
 		wp_cache_debug( "wp_cron_preload_cache: clean expired cache files older than $cache_max_time seconds.", 5 );
 		wp_cache_phase2_clean_expired( $file_prefix, true ); // force cleanup of old files.
 	}
@@ -3054,7 +3330,6 @@ function next_preload_message( $hook, $text, $limit = 0 ) {
 			return false;
 		$h = $m = $s = 0;
 		if ( $next_time > 0 ) {
-			// http://bytes.com/topic/php/answers/3917-seconds-converted-hh-mm-ss
 			$m = (int)($next_time / 60);
 			$s = $next_time % 60;
 			$h = (int)($m / 60); $m = $m % 60;
@@ -3086,7 +3361,7 @@ function check_up_on_preloading() {
 }
 add_action( 'init', 'check_up_on_preloading' ); // sometimes preloading stops working. Kickstart it.
 
-function wp_cache_disable_plugin() {
+function wp_cache_disable_plugin( $delete_config_file = true ) {
 	global $wp_cache_config_file, $wp_rewrite;
 	if ( file_exists( ABSPATH . 'wp-config.php') ) {
 		$global_config_file = ABSPATH . 'wp-config.php';
@@ -3103,7 +3378,7 @@ function wp_cache_disable_plugin() {
 		if ( false == @unlink( WP_CONTENT_DIR . "/advanced-cache.php" ) )
 			$file_not_deleted[] = 'advanced-cache.php';
 	}
-	if ( @file_exists( WP_CONTENT_DIR . "/wp-cache-config.php" ) ) {
+	if ( $delete_config_file && @file_exists( WP_CONTENT_DIR . "/wp-cache-config.php" ) ) {
 		if ( false == unlink( WP_CONTENT_DIR . "/wp-cache-config.php" ) )
 			$file_not_deleted[] = 'wp-cache-config.php';
 	}
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 c761f27bf..0fccf5696 100644
--- a/wp-content/plugins/wp-super-cache/wp-super-cache.pot
+++ b/wp-content/plugins/wp-super-cache/wp-super-cache.pot
@@ -1,14 +1,14 @@
-# Copyright (C) 2013 
-# This file is distributed under the same license as the  package.
+# Copyright (C) 2016 WP Super Cache
+# This file is distributed under the same license as the WP Super Cache package.
 msgid ""
 msgstr ""
-"Project-Id-Version:  \n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-super-cache\n"
-"POT-Creation-Date: 2013-10-23 10:46:15+00:00\n"
+"Project-Id-Version: WP Super Cache 1.4.7\n"
+"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-super-cache\n"
+"POT-Creation-Date: 2016-03-07 13:27:41+00:00\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 
@@ -16,7 +16,7 @@ msgstr ""
 msgid ""
 "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 "
+"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 "
@@ -24,65 +24,57 @@ msgid ""
 "+does+Origin+Pull+work%3F\" target=\"_blank\">origin pull</a>."
 msgstr ""
 
-#: ossdl-cdn.php:152 wp-cache.php:1177
-msgid ""
-"The <a href=\"%1$s\">CDN Sync Tool</a> plugin will help upload files to "
-"Amazon S3/Cloudfront if you would rather not depend on origin pull. See the "
-"<a href=\"%2$s\">plugin support forum</a> if you have any queries about this "
-"plugin."
-msgstr ""
-
-#: ossdl-cdn.php:153
+#: ossdl-cdn.php:152
 msgid ""
 "<strong style=\"color: red\">WARNING:</strong> Test some static urls e.g., "
 "%s  to ensure your CDN service is fully working before saving changes."
 msgstr ""
 
-#: ossdl-cdn.php:154
+#: ossdl-cdn.php:153
 msgid "You can define different CDN URLs for each site on a multsite network."
 msgstr ""
 
-#: ossdl-cdn.php:162
+#: ossdl-cdn.php:161
 msgid "Enable CDN Support"
 msgstr ""
 
-#: ossdl-cdn.php:165
+#: ossdl-cdn.php:164
 msgid "Off-site URL"
 msgstr ""
 
-#: ossdl-cdn.php:168
+#: ossdl-cdn.php:167
 msgid ""
 "The new URL to be used in place of %1$s for rewriting. No trailing <code>/</"
 "code> please.<br />Example: <code>%2$s</code>."
 msgstr ""
 
-#: ossdl-cdn.php:172
+#: ossdl-cdn.php:171
 msgid "Include directories"
 msgstr ""
 
-#: ossdl-cdn.php:175
+#: ossdl-cdn.php:174
 msgid ""
 "Directories to include in static file matching. Use a comma as the "
 "delimiter. Default is <code>wp-content, wp-includes</code>, which will be "
 "enforced if this field is left empty."
 msgstr ""
 
-#: ossdl-cdn.php:179
+#: ossdl-cdn.php:178
 msgid "Exclude if substring"
 msgstr ""
 
-#: ossdl-cdn.php:182
+#: ossdl-cdn.php:181
 msgid ""
 "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)."
 msgstr ""
 
-#: ossdl-cdn.php:186
+#: ossdl-cdn.php:185
 msgid "Additional CNAMES"
 msgstr ""
 
-#: ossdl-cdn.php:189
+#: ossdl-cdn.php:188
 msgid ""
 "These <a href=\"http://en.wikipedia.org/wiki/CNAME_record\">CNAMES</a> will "
 "be used in place of %1$s for rewriting (in addition to the off-site URL "
@@ -91,19 +83,19 @@ msgid ""
 "be configured on your CDN.<br />Example: %2$s"
 msgstr ""
 
-#: ossdl-cdn.php:193
+#: ossdl-cdn.php:192
 msgid "Skip https URLs to avoid \"mixed content\" errors"
 msgstr ""
 
-#: ossdl-cdn.php:197
+#: ossdl-cdn.php:196
 msgid "Save Changes"
 msgstr ""
 
-#: ossdl-cdn.php:199
+#: ossdl-cdn.php:198
 msgid ""
-"CDN functionality provided by <a href=\"http://wordpress.org/extend/plugins/"
-"ossdl-cdn-off-linker/\">OSSDL CDN Off Linker</a> by <a href=\"http://mark."
-"ossdl.de/\">Mark Kubacki</a>"
+"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>"
 msgstr ""
 
 #: plugins/awaitingmoderation.php:4
@@ -116,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:1418
+#: 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:1418
+#: plugins/searchengine.php:70 plugins/wptouch.php:23 wp-cache.php:1500
 msgid "Disabled"
 msgstr ""
 
@@ -134,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:1879
-#: wp-cache.php:1881
+#: plugins/searchengine.php:75 plugins/wptouch.php:28 wp-cache.php:1973
+#: wp-cache.php:1975
 msgid "enabled"
 msgstr ""
 
@@ -174,7 +166,7 @@ msgstr ""
 msgid "Bad Behavior support is now %s"
 msgstr ""
 
-#: plugins/badbehaviour.php:83 wp-cache.php:1508 wp-cache.php:1513
+#: plugins/badbehaviour.php:83 wp-cache.php:1593 wp-cache.php:1598
 msgid "Warning!"
 msgstr ""
 
@@ -224,11 +216,11 @@ msgstr ""
 msgid "Cached"
 msgstr ""
 
-#: plugins/multisite.php:31 wp-cache.php:1431
+#: plugins/multisite.php:31 wp-cache.php:1513
 msgid "Enable"
 msgstr ""
 
-#: plugins/multisite.php:33 plugins/searchengine.php:61 wp-cache.php:1431
+#: plugins/multisite.php:33 plugins/searchengine.php:61 wp-cache.php:1513
 msgid "Disable"
 msgstr ""
 
@@ -270,42 +262,42 @@ msgid ""
 "the WPTouch helper plugin."
 msgstr ""
 
-#: wp-cache-phase2.php:1264
+#: wp-cache-phase2.php:1334
 msgid "Cache expiry cron job failed. Job will run again in 10 seconds."
 msgstr ""
 
-#: wp-cache-phase2.php:1268
+#: wp-cache-phase2.php:1338
 msgid ""
 "Cache expiry cron job took more than 30 seconds. You should probably run the "
 "garbage collector more often."
 msgstr ""
 
-#: wp-cache-phase2.php:1277
+#: wp-cache-phase2.php:1347
 msgid "[%1$s] WP Super Cache GC Report"
 msgstr ""
 
-#: wp-cache.php:109
+#: wp-cache.php:111
 msgid ""
 "Please create %s /wp-cache-config.php from wp-super-cache/wp-cache-config-"
 "sample.php"
 msgstr ""
 
-#: wp-cache.php:175
+#: wp-cache.php:203
 msgid "Warning! PHP Safe Mode Enabled!"
 msgstr ""
 
-#: wp-cache.php:176
+#: wp-cache.php:204
 msgid ""
 "You may experience problems running this plugin because SAFE MODE is enabled."
 msgstr ""
 
-#: wp-cache.php:180
+#: wp-cache.php:208
 msgid ""
 "Your server is set up to check the owner of PHP scripts before allowing them "
 "to read and write files."
 msgstr ""
 
-#: wp-cache.php:181
+#: wp-cache.php:209
 msgid ""
 "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 "
@@ -314,7 +306,7 @@ msgid ""
 "details."
 msgstr ""
 
-#: wp-cache.php:183
+#: wp-cache.php:211
 msgid ""
 "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 "
@@ -322,50 +314,50 @@ msgid ""
 "php.ini config file."
 msgstr ""
 
-#: wp-cache.php:189
+#: wp-cache.php:217
 msgid "Permlink Structure Error"
 msgstr ""
 
-#: wp-cache.php:190
+#: wp-cache.php:218
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:202
+#: wp-cache.php:230
 msgid "Warning! Your hostname \"%s\" resolves to %s"
 msgstr ""
 
-#: wp-cache.php:203
+#: wp-cache.php:231
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:204 wp-cache.php:218
+#: wp-cache.php:232 wp-cache.php:246
 msgid ""
 "Please see entry 16 in the <a href=\"%s\">Troubleshooting section</a> of the "
 "readme.txt"
 msgstr ""
 
-#: wp-cache.php:217
+#: wp-cache.php:245
 msgid ""
-"Unfortunately WordPress cannot find the file wp-cron.php. This script is "
-"required for the the correct operation of garbage collection by this plugin, "
+"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."
 msgstr ""
 
-#: wp-cache.php:231
+#: wp-cache.php:259
 msgid "Cannot continue... fix previous problems and retry."
 msgstr ""
 
-#: wp-cache.php:240
+#: wp-cache.php:268
 msgid "Zlib Output Compression Enabled!"
 msgstr ""
 
-#: wp-cache.php:241
+#: wp-cache.php:269
 msgid ""
 "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 "
@@ -374,11 +366,11 @@ msgid ""
 "configuration.php\">this page</a> for instructions on modifying your php.ini."
 msgstr ""
 
-#: wp-cache.php:245
+#: wp-cache.php:273
 msgid "Mod rewrite may not be installed!"
 msgstr ""
 
-#: wp-cache.php:246
+#: wp-cache.php:274
 msgid ""
 "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 "
@@ -386,111 +378,111 @@ msgid ""
 "static files. You will still be able to use legacy or PHP modes."
 msgstr ""
 
-#: wp-cache.php:252
+#: wp-cache.php:280
 msgid "Read Only Mode. Configuration cannot be changed."
 msgstr ""
 
-#: wp-cache.php:253
+#: wp-cache.php:281
 msgid ""
 "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 webserver to make "
-"any changes."
+"and cannot be modified. That file must be writeable by the web server to "
+"make any changes."
 msgstr ""
 
-#: wp-cache.php:254
+#: wp-cache.php:282
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:255 wp-cache.php:304
+#: wp-cache.php:283 wp-cache.php:332
 msgid ""
 "<a href=\"http://codex.wordpress.org/Changing_File_Permissions\">This page</"
 "a> explains how to change file permissions."
 msgstr ""
 
-#: wp-cache.php:256
+#: wp-cache.php:284
 msgid "Writeable:"
 msgstr ""
 
-#: wp-cache.php:257
-msgid "Readonly:"
+#: wp-cache.php:285
+msgid "Read-only:"
 msgstr ""
 
-#: wp-cache.php:275
+#: wp-cache.php:303
 msgid "Warning! Garbage collection is not scheduled!"
 msgstr ""
 
-#: wp-cache.php:276
+#: wp-cache.php:304
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:281 wp-cache.php:309 wp-cache.php:379
+#: wp-cache.php:309 wp-cache.php:337 wp-cache.php:409 wp-cache.php:2165
 msgid "Dismiss"
 msgstr ""
 
-#: wp-cache.php:302
+#: wp-cache.php:330
 msgid "Warning! %s is writeable!"
 msgstr ""
 
-#: wp-cache.php:303
+#: wp-cache.php:331
 msgid ""
 "You should change the permissions on %s and make it more restrictive. Use "
 "your ftp client, or the following command to fix things:"
 msgstr ""
 
-#: wp-cache.php:321
+#: wp-cache.php:349
 msgid "Mobile rewrite rules detected"
 msgstr ""
 
-#: wp-cache.php:322
+#: wp-cache.php:350
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:322
+#: wp-cache.php:350
 msgid ""
 "This will have no affect on ordinary users but mobile users will see "
 "uncached pages."
 msgstr ""
 
-#: wp-cache.php:328 wp-cache.php:339
+#: wp-cache.php:356 wp-cache.php:367
 msgid "Rewrite rules must be updated"
 msgstr ""
 
-#: wp-cache.php:329 wp-cache.php:340
+#: wp-cache.php:357 wp-cache.php:368
 msgid "The rewrite rules required by this plugin have changed or are missing. "
 msgstr ""
 
-#: wp-cache.php:330
+#: wp-cache.php:358
 msgid ""
 "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):"
 msgstr ""
 
-#: wp-cache.php:331
+#: wp-cache.php:359
 msgid "Set the plugin to legacy mode and enable mobile support."
 msgstr ""
 
-#: wp-cache.php:332 wp-cache.php:341
+#: wp-cache.php:360 wp-cache.php:369
 msgid ""
 "Scroll down the Advanced Settings page and click the <strong>Update "
 "Mod_Rewrite Rules</strong> button."
 msgstr ""
 
-#: wp-cache.php:333
+#: wp-cache.php:361
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:334
+#: wp-cache.php:362
 msgid ""
 "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</"
@@ -499,101 +491,101 @@ msgid ""
 "these lines: (do it twice, once for each section)"
 msgstr ""
 
-#: wp-cache.php:347
+#: wp-cache.php:375
 msgid "Required to serve compressed supercache files properly."
 msgstr ""
 
-#: wp-cache.php:347
+#: wp-cache.php:375
 msgid ""
 "Required to set caching information on supercache pages. IE7 users will see "
 "old pages without this module."
 msgstr ""
 
-#: wp-cache.php:347
+#: wp-cache.php:375
 msgid ""
 "Set the expiry date on supercached pages. Visitors may not see new pages "
 "when they refresh or leave comments without this module."
 msgstr ""
 
-#: wp-cache.php:354
+#: wp-cache.php:382
 msgid "Missing Apache Modules"
 msgstr ""
 
-#: wp-cache.php:355
+#: wp-cache.php:383
 msgid ""
 "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."
 msgstr ""
 
-#: wp-cache.php:373
+#: wp-cache.php:403
 msgid ".htaccess file may need to be moved"
 msgstr ""
 
-#: wp-cache.php:374
+#: wp-cache.php:404
 msgid ""
 "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 "
+"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."
 msgstr ""
 
-#: wp-cache.php:607
+#: wp-cache.php:665
 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:703
+#: wp-cache.php:764
 msgid "WP Super Cache Settings"
 msgstr ""
 
-#: wp-cache.php:717
+#: wp-cache.php:778
 msgid ""
 "Notice: <em>Mod_rewrite or Legacy caching enabled</em>. Showing Advanced "
 "Settings Page by default."
 msgstr ""
 
-#: wp-cache.php:728
+#: wp-cache.php:789
 msgid ""
 "Configuration file changed, some values might be wrong. Load the page again "
 "from the \"Settings\" menu to reset them."
 msgstr ""
 
-#: wp-cache.php:760
+#: wp-cache.php:821
 msgid "Caching must be enabled to use this feature"
 msgstr ""
 
-#: wp-cache.php:778 wp-cache.php:918
+#: wp-cache.php:839 wp-cache.php:979
 msgid "Cancel Cache Preload"
 msgstr ""
 
-#: wp-cache.php:786
+#: wp-cache.php:847
 msgid ""
 "Scheduled preloading of cache almost cancelled. It may take up to a minute "
 "for it to cancel completely."
 msgstr ""
 
-#: wp-cache.php:797
+#: wp-cache.php:858
 msgid "Scheduled preloading of cache cancelled."
 msgstr ""
 
-#: wp-cache.php:829 wp-cache.php:916
+#: wp-cache.php:890 wp-cache.php:977
 msgid "Preload Cache Now"
 msgstr ""
 
-#: wp-cache.php:833
+#: wp-cache.php:894
 msgid "Scheduled preloading of cache in 10 seconds."
 msgstr ""
 
-#: wp-cache.php:838
+#: wp-cache.php:899
 msgid "Scheduled preloading of cache in %d minutes"
 msgstr ""
 
-#: wp-cache.php:842
+#: wp-cache.php:903
 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 "
@@ -601,281 +593,345 @@ msgid ""
 "speed as a metric when judging websites now."
 msgstr ""
 
-#: wp-cache.php:843
+#: wp-cache.php:904
 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:844
+#: wp-cache.php:905
 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:848
+#: wp-cache.php:909
 msgid ""
 "Refresh preloaded cache files every %s minutes. (0 to disable, minimum %d "
 "minutes.)"
 msgstr ""
 
-#: wp-cache.php:861
+#: wp-cache.php:922
 msgid "all"
 msgstr ""
 
-#: wp-cache.php:874
+#: wp-cache.php:935
 msgid "Preload %s posts."
 msgstr ""
 
-#: wp-cache.php:881
+#: wp-cache.php:942
 msgid ""
 "Preload mode (garbage collection only on legacy cache files. Recommended.)"
 msgstr ""
 
-#: wp-cache.php:884
+#: wp-cache.php:945
 msgid "Preload tags, categories and other taxonomies."
 msgstr ""
 
-#: wp-cache.php:887
+#: wp-cache.php:948
 msgid "Send me status emails when files are refreshed."
 msgstr ""
 
-#: wp-cache.php:892
+#: wp-cache.php:953
 msgid "Many emails, 2 emails per 100 posts."
 msgstr ""
 
-#: wp-cache.php:895
+#: wp-cache.php:956
 msgid "Medium, 1 email per 100 posts."
 msgstr ""
 
-#: wp-cache.php:898
+#: wp-cache.php:959
 msgid "Less emails, 1 at the start and 1 at the end of preloading all posts."
 msgstr ""
 
-#: wp-cache.php:902
+#: wp-cache.php:963
 msgid "Refresh of cache in %d hours %d minutes and %d seconds."
 msgstr ""
 
-#: wp-cache.php:903
+#: wp-cache.php:964
 msgid "Full refresh of cache in %d hours %d minutes and %d seconds."
 msgstr ""
 
-#: wp-cache.php:909
+#: wp-cache.php:970
 msgid "Currently caching from post %d to %d."
 msgstr ""
 
-#: wp-cache.php:913
+#: wp-cache.php:974
 msgid "<strong>Page last cached:</strong> %s"
 msgstr ""
 
-#: wp-cache.php:916
+#: wp-cache.php:977
 msgid "Update Settings"
 msgstr ""
 
-#: wp-cache.php:924
+#: wp-cache.php:985
 msgid ""
 "Preloading of cache disabled. Please disable legacy page caching or talk to "
 "your host administrator."
 msgstr ""
 
-#: wp-cache.php:941 wp-cache.php:1053
+#: wp-cache.php:1002 wp-cache.php:1143
 msgid "Caching"
 msgstr ""
 
-#: wp-cache.php:945
+#: wp-cache.php:1006
 msgid "Cache hits to this website for quick access."
 msgstr ""
 
-#: wp-cache.php:945 wp-cache.php:946 wp-cache.php:963 wp-cache.php:972
-#: wp-cache.php:979 wp-cache.php:982 wp-cache.php:1000 wp-cache.php:1056
+#: wp-cache.php:1006 wp-cache.php:1008 wp-cache.php:1024 wp-cache.php:1033
+#: wp-cache.php:1040 wp-cache.php:1043 wp-cache.php:1061 wp-cache.php:1146
 msgid "Recommended"
 msgstr ""
 
-#: wp-cache.php:946
+#: wp-cache.php:1007
 msgid "Use mod_rewrite to serve cache files."
 msgstr ""
 
-#: wp-cache.php:947
+#: wp-cache.php:1008
 msgid "Use PHP to serve cache files."
 msgstr ""
 
-#: wp-cache.php:948
+#: wp-cache.php:1009
 msgid "Legacy page caching."
 msgstr ""
 
-#: wp-cache.php:949
+#: 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:955
+#: wp-cache.php:1016
 msgid "Miscellaneous"
 msgstr ""
 
-#: wp-cache.php:961
-msgid "Warning! Compression is disabled as gzencode() function not found."
+#: wp-cache.php:1022
+msgid "Warning! Compression is disabled as gzencode() function was not found."
 msgstr ""
 
-#: wp-cache.php:963
+#: wp-cache.php:1024
 msgid "Compress pages so they&#8217;re served more quickly to visitors."
 msgstr ""
 
-#: wp-cache.php:964
+#: 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:972
+#: wp-cache.php:1033
 msgid ""
 "304 Not Modified browser caching. Indicate when a page has not been modified "
-"since last requested."
+"since it was last requested."
 msgstr ""
 
-#: wp-cache.php:975
+#: wp-cache.php:1036
 msgid ""
-"Warning! 304 browser caching is only supported when not using mod_rewrite "
-"caching."
+"Warning! 304 browser caching is only supported when mod_rewrite caching is "
+"not used."
 msgstr ""
 
-#: wp-cache.php:977
+#: wp-cache.php:1038
 msgid ""
 "304 support is disabled by default because some hosts have had problems with "
 "the headers used in the past."
 msgstr ""
 
-#: wp-cache.php:979
+#: wp-cache.php:1040
 msgid ""
 "Don&#8217;t cache pages for <acronym title=\"Logged in users and those that "
 "comment\">known users</acronym>."
 msgstr ""
 
-#: wp-cache.php:980
+#: wp-cache.php:1041
 msgid "Don&#8217;t cache pages with GET parameters. (?x=y at the end of a url)"
 msgstr ""
 
-#: wp-cache.php:981
+#: wp-cache.php:1042
 msgid ""
 "Make known users anonymous so they&#8217;re served supercached static files."
 msgstr ""
 
-#: wp-cache.php:982
+#: wp-cache.php:1043
 msgid ""
 "Cache rebuild. Serve a supercache file to anonymous users while a new file "
 "is being generated."
 msgstr ""
 
-#: wp-cache.php:983
+#: wp-cache.php:1044
 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:989 wp-cache.php:1266 wp-cache.php:1888
+#: wp-cache.php:1050 wp-cache.php:1350 wp-cache.php:1982
 msgid "Advanced"
 msgstr ""
 
-#: wp-cache.php:993
+#: wp-cache.php:1054
 msgid ""
 "Enable dynamic caching. Requires PHP or legacy caching. (See <a href="
-"\"http://wordpress.org/extend/plugins/wp-super-cache/faq/\">FAQ</a> or wp-"
-"super-cache/plugins/dynamic-cache-test.php for example code.)"
+"\"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:994
+#: wp-cache.php:1055
 msgid ""
 "Mobile device support. (External plugin or theme required. See the <a href="
-"\"http://wordpress.org/extend/plugins/wp-super-cache/faq/\">FAQ</a> for "
-"further details.)"
+"\"http://wordpress.org/plugins/wp-super-cache/faq/\">FAQ</a> for further "
+"details.)"
 msgstr ""
 
-#: wp-cache.php:996
+#: wp-cache.php:1057
 msgid "Mobile Browsers"
 msgstr ""
 
-#: wp-cache.php:996
+#: wp-cache.php:1057
 msgid "Mobile Prefixes"
 msgstr ""
 
-#: wp-cache.php:998
+#: wp-cache.php:1059
 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:999
+#: wp-cache.php:1060
 msgid "Clear all cache files when a post or page is published or updated."
 msgstr ""
 
-#: wp-cache.php:1000
+#: wp-cache.php:1061
 msgid "Extra homepage checks. (Very occasionally stops homepage caching)"
 msgstr ""
 
-#: wp-cache.php:1001
+#: wp-cache.php:1062
 msgid "Only refresh current page when comments made."
 msgstr ""
 
-#: wp-cache.php:1002
+#: wp-cache.php:1063
 msgid "List the newest cached pages on this page."
 msgstr ""
 
-#: wp-cache.php:1004
+#: wp-cache.php:1065
 msgid ""
 "Coarse file locking. You probably don&#8217;t need this but it may help if "
 "your server is underpowered. Warning! <em>May cause your server to lock up "
 "in very rare cases!</em>"
 msgstr ""
 
-#: wp-cache.php:1006
+#: wp-cache.php:1067
 msgid ""
 "Late init. Display cached files after WordPress has loaded. Most useful in "
 "legacy mode."
 msgstr ""
 
-#: wp-cache.php:1008
+#: wp-cache.php:1069
 msgid "Use object cache to store cached files."
 msgstr ""
 
-#: wp-cache.php:1008
+#: wp-cache.php:1069
 msgid "(Experimental)"
 msgstr ""
 
-#: wp-cache.php:1010
+#: wp-cache.php:1071
 msgid "<strong>DO NOT CACHE PAGE</strong> secret key: <a href=\"%s\">%s</a>"
 msgstr ""
 
-#: wp-cache.php:1016
+#: wp-cache.php:1076
+msgid "Cache Location"
+msgstr ""
+
+#: wp-cache.php:1081
+msgid ""
+"Change the location of your cache files. The default is WP_CONTENT_DIR . /"
+"cache/ which translates to %s."
+msgstr ""
+
+#: wp-cache.php:1082
+msgid "You must give the full path to the directory."
+msgstr ""
+
+#: wp-cache.php:1083
+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:1084
+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:1085
+msgid ""
+"Submit a blank entry to set it to the default directory, WP_CONTENT_DIR . /"
+"cache/."
+msgstr ""
+
+#: wp-cache.php:1087
+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:1089
+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 "
+"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."
+msgstr ""
+
+#: wp-cache.php:1091
+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:1098
+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:1106
 msgid "Note:"
 msgstr ""
 
-#: wp-cache.php:1018
+#: wp-cache.php:1108
 msgid ""
 "Uninstall this plugin on the plugins page. It will automatically clean up "
-"after itself. If manual intervention is required then simple instructions "
+"after itself. If manual intervention is required, then simple instructions "
 "are provided."
 msgstr ""
 
-#: wp-cache.php:1019
+#: wp-cache.php:1109
 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 "
 "<em>cache-config.php</em> can be deleted automatically. (Making sure those "
-"files are writeable too is probably a good idea!)"
+"files are writeable is probably a good idea!)"
 msgstr ""
 
-#: wp-cache.php:1020
+#: wp-cache.php:1110
 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:1021
+#: wp-cache.php:1111
 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 "
@@ -883,153 +939,147 @@ msgid ""
 "have been answered."
 msgstr ""
 
-#: wp-cache.php:1024 wp-cache.php:1071
+#: wp-cache.php:1114 wp-cache.php:1161
 msgid "Update Status"
 msgstr ""
 
-#: wp-cache.php:1031
+#: wp-cache.php:1121
 msgid "Accepted Filenames &amp; Rejected URIs"
 msgstr ""
 
-#: wp-cache.php:1056
+#: wp-cache.php:1146
 msgid "Caching On"
 msgstr ""
 
-#: wp-cache.php:1057
+#: wp-cache.php:1147
 msgid "Caching Off"
 msgstr ""
 
-#: wp-cache.php:1058
+#: wp-cache.php:1148
 msgid "Note: enables PHP caching, cache rebuild, and mobile support"
 msgstr ""
 
-#: wp-cache.php:1068
+#: wp-cache.php:1158
 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 "
-"please ignore this message or you can edit the .htaccess file in the root of "
-"your install and remove the SuperCache rules."
+"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."
 msgstr ""
 
-#: wp-cache.php:1073
+#: wp-cache.php:1163
 msgid "Cache Tester"
 msgstr ""
 
-#: wp-cache.php:1074
+#: wp-cache.php:1164
 msgid "Test your cached website by clicking the test button below."
 msgstr ""
 
-#: wp-cache.php:1080
+#: wp-cache.php:1170
 msgid "Fetching %s to prime cache: "
 msgstr ""
 
-#: wp-cache.php:1082 wp-cache.php:1091 wp-cache.php:1103
+#: wp-cache.php:1172 wp-cache.php:1181 wp-cache.php:1193
 msgid "OK"
 msgstr ""
 
-#: wp-cache.php:1085
+#: wp-cache.php:1175
 msgid "Fetching first copy of %s: "
 msgstr ""
 
-#: wp-cache.php:1094 wp-cache.php:1105
+#: wp-cache.php:1184 wp-cache.php:1195
 msgid "FAILED"
 msgstr ""
 
-#: wp-cache.php:1097
+#: wp-cache.php:1187
 msgid "Fetching second copy of %s: "
 msgstr ""
 
-#: wp-cache.php:1109
+#: wp-cache.php:1199
 msgid "One or more page requests failed:"
 msgstr ""
 
-#: wp-cache.php:1128 wp-cache.php:1129
+#: wp-cache.php:1218 wp-cache.php:1219
 msgid "Page %d: %d (%s)"
 msgstr ""
 
-#: wp-cache.php:1135
+#: wp-cache.php:1225
 msgid "Page 1: %s"
 msgstr ""
 
-#: wp-cache.php:1136
+#: wp-cache.php:1226
 msgid "Page 2: %s"
 msgstr ""
 
-#: wp-cache.php:1137
+#: wp-cache.php:1227
 msgid "The timestamps on both pages match!"
 msgstr ""
 
-#: wp-cache.php:1139
+#: wp-cache.php:1229
 msgid "The pages do not match! Timestamps differ or were not found!"
 msgstr ""
 
-#: wp-cache.php:1140
+#: wp-cache.php:1230
 msgid "Things you can do:"
 msgstr ""
 
-#: wp-cache.php:1141
+#: wp-cache.php:1231
 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:1142
+#: wp-cache.php:1232
 msgid ""
 "Enable logging on the Debug page here. That should help you track down the "
 "problem."
 msgstr ""
 
-#: wp-cache.php:1143
+#: wp-cache.php:1233
 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:1151
+#: wp-cache.php:1241
 msgid "Send non-secure (non https) request for homepage"
 msgstr ""
 
-#: wp-cache.php:1152
+#: wp-cache.php:1242
 msgid "Test Cache"
 msgstr ""
 
-#: wp-cache.php:1156
+#: wp-cache.php:1246
 msgid "Delete Cached Pages"
 msgstr ""
 
-#: wp-cache.php:1157
+#: wp-cache.php:1247
 msgid ""
 "Cached pages are stored on your server as html and PHP files. If you need to "
-"delete them use the button below."
+"delete them, use the button below."
 msgstr ""
 
-#: wp-cache.php:1160 wp-cache.php:2429 wp-cache.php:2448 wp-cache.php:2619
-#: wp-cache.php:3156
+#: wp-cache.php:1250 wp-cache.php:2688 wp-cache.php:2707 wp-cache.php:2898
+#: wp-cache.php:3437
 msgid "Delete Cache"
 msgstr ""
 
-#: wp-cache.php:1167 wp-cache.php:2435
+#: wp-cache.php:1257 wp-cache.php:2694
 msgid "Delete Cache On All Blogs"
 msgstr ""
 
-#: wp-cache.php:1172
+#: wp-cache.php:1262
 msgid "Recommended Links and Plugins"
 msgstr ""
 
-#: wp-cache.php:1173
+#: wp-cache.php:1263
 msgid ""
 "Caching is only one part of making a website faster. Here are some other "
 "plugins that will help:"
 msgstr ""
 
-#: wp-cache.php:1174
-msgid ""
-"<a href=\"%s\">WPSCMin</a>, a Supercache plugin that minifies cached pages "
-"by removing whitespaces and extra characters "
-msgstr ""
-
-#: wp-cache.php:1175
+#: wp-cache.php:1264
 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 "
@@ -1037,118 +1087,101 @@ msgid ""
 "the performance tools online at <a href=\"%s\">GTMetrix</a>."
 msgstr ""
 
-#: wp-cache.php:1176
+#: wp-cache.php:1265
 msgid ""
 "<a href=\"%s\">Use Google Libraries</a> allows you to load some commonly "
-"used Javascript libraries from Google webservers. Ironically it may reduce "
+"used Javascript libraries from Google webservers. Ironically, it may reduce "
 "your Yslow score."
 msgstr ""
 
-#: wp-cache.php:1178
+#: wp-cache.php:1266
 msgid ""
 "<strong>Advanced users only:</strong> <a href=\"%s\">Speed up your site with "
 "Caching and cache-control</a> explains how to make your site more cacheable "
 "with .htaccess rules."
 msgstr ""
 
-#: wp-cache.php:1179
+#: 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:1180
+#: 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:1191
-msgid "Make WordPress Faster"
-msgstr ""
-
-#: wp-cache.php:1192
-msgid ""
-"%1$s is maintained and developed by %2$s with contributions from many others."
-msgstr ""
-
-#: wp-cache.php:1193
-msgid "He blogs at %1$s and posts photos at %2$s."
-msgstr ""
-
-#: wp-cache.php:1194
-msgid "Please say hi to him on %s too!"
-msgstr ""
-
-#: wp-cache.php:1195
+#: wp-cache.php:1279
 msgid "Need Help?"
 msgstr ""
 
-#: wp-cache.php:1197
+#: 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:1198
+#: wp-cache.php:1282
 msgid "<a href=\"%1$s\">Installation Help</a>"
 msgstr ""
 
-#: wp-cache.php:1199
+#: wp-cache.php:1283
 msgid "<a href=\"%1$s\">Frequently Asked Questions</a>"
 msgstr ""
 
-#: wp-cache.php:1200
+#: wp-cache.php:1284
 msgid "<a href=\"%1$s\">Support Forum</a>"
 msgstr ""
 
-#: wp-cache.php:1201
+#: wp-cache.php:1285
 msgid "<a href=\"%1$s\">Development Version</a>"
 msgstr ""
 
-#: wp-cache.php:1203
+#: wp-cache.php:1287
 msgid "Rate This Plugin!"
 msgstr ""
 
-#: wp-cache.php:1204
+#: 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:1213
+#: wp-cache.php:1297
 msgid "Cached pages since %1$s : <strong>%2$s</strong>"
 msgstr ""
 
-#: wp-cache.php:1214
+#: wp-cache.php:1298
 msgid "Newest Cached Pages:"
 msgstr ""
 
-#: wp-cache.php:1218
+#: wp-cache.php:1302
 msgid "Cached %s seconds ago"
 msgstr ""
 
-#: wp-cache.php:1221
+#: wp-cache.php:1305
 msgid "(may not always be accurate on busy sites)"
 msgstr ""
 
-#: wp-cache.php:1237
+#: 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:1238
+#: 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:1239
+#: wp-cache.php:1323
 msgid ""
-"<strong>Warning</strong>! Due to the way WordPress upgrades plugins the "
+"<strong>Warning</strong>! Due to the way WordPress upgrades plugins, the "
 "plugins you upload to wp-super-cache/plugins/ will be deleted when you "
 "upgrade WP Super Cache. You can avoid this by loading the plugins from "
 "elsewhere. Set <strong>$wp_cache_plugins_dir</strong> to the new location in "
@@ -1157,78 +1190,78 @@ msgid ""
 "\">developer documentation</a>."
 msgstr ""
 
-#: wp-cache.php:1249
+#: wp-cache.php:1333
 msgid "Available Plugins"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1350
 msgid "Easy"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1350
 msgid "CDN"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1350
 msgid "Contents"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1350
 msgid "Preload"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1350
 msgid "Plugins"
 msgstr ""
 
-#: wp-cache.php:1266
+#: wp-cache.php:1350
 msgid "Debug"
 msgstr ""
 
-#: wp-cache.php:1304
+#: 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:1313
+#: wp-cache.php:1397
 msgid "Mod Rewrite Rules"
 msgstr ""
 
-#: wp-cache.php:1319
+#: wp-cache.php:1403
 msgid "WordPress MU Detected"
 msgstr ""
 
-#: wp-cache.php:1319
+#: 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."
+"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:1321
+#: wp-cache.php:1405
 msgid "Mod Rewrite rules cannot be updated!"
 msgstr ""
 
-#: wp-cache.php:1322
+#: 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:1324
+#: wp-cache.php:1408
 msgid "Refresh this page when you have updated your .htaccess file."
 msgstr ""
 
-#: wp-cache.php:1328
+#: wp-cache.php:1412
 msgid "Thank you for upgrading."
 msgstr ""
 
-#: wp-cache.php:1328
+#: 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 "
+"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\" "
@@ -1237,11 +1270,11 @@ msgid ""
 "brave enough to use them."
 msgstr ""
 
-#: wp-cache.php:1332
+#: wp-cache.php:1416
 msgid "Trailing slash check required."
 msgstr ""
 
-#: wp-cache.php:1332
+#: 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 "
@@ -1250,414 +1283,418 @@ msgid ""
 "and add these two rules to the two groups of Super Cache rules:"
 msgstr ""
 
-#: wp-cache.php:1334
+#: 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:1348
+#: wp-cache.php:1432
 msgid "Mod Rewrite rules updated!"
 msgstr ""
 
-#: wp-cache.php:1349
+#: 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:1351
+#: wp-cache.php:1435
 msgid "Mod Rewrite rules must be updated!"
 msgstr ""
 
-#: wp-cache.php:1352
+#: 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:1357
+#: 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."
+"upgraded the plugin, make sure these rules match."
 msgstr ""
 
-#: wp-cache.php:1360
+#: 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 "
+"rules has been found. This could be simple whitespace differences, but you "
 "should compare the rules in the file with those below as soon as possible. "
 "Click the &#8217;Update Mod_Rewrite Rules&#8217; button to update the rules."
 msgstr ""
 
-#: wp-cache.php:1362
+#: wp-cache.php:1446
 msgid "View Mod_Rewrite Rules"
 msgstr ""
 
-#: wp-cache.php:1368 wp-cache.php:2737
+#: wp-cache.php:1452 wp-cache.php:3016
 msgid "Rules must be added to %s too:"
 msgstr ""
 
-#: wp-cache.php:1375
+#: wp-cache.php:1458
 msgid "Gzip encoding rules in %s.htaccess created."
 msgstr ""
 
-#: wp-cache.php:1382
+#: wp-cache.php:1464
 msgid "Fix Configuration"
 msgstr ""
 
-#: wp-cache.php:1385
+#: wp-cache.php:1467
 msgid "Restore Default Configuration"
 msgstr ""
 
-#: wp-cache.php:1393
+#: wp-cache.php:1475
 msgid ""
 "Comment moderation is enabled. Your comment may take some time to appear."
 msgstr ""
 
-#: wp-cache.php:1418
+#: wp-cache.php:1500
 msgid "Lock Down:"
 msgstr ""
 
-#: wp-cache.php:1419
+#: 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:1420
+#: 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:1422
+#: wp-cache.php:1504
 msgid "Sorry. My blog is locked down. Updates will appear shortly"
 msgstr ""
 
-#: wp-cache.php:1426
+#: 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:1428
+#: wp-cache.php:1510
 msgid ""
 "WordPress is not locked down. New comments will refresh Super Cache static "
 "files as normal."
 msgstr ""
 
-#: wp-cache.php:1434
+#: wp-cache.php:1516
 msgid "Lock Down"
 msgstr ""
 
-#: wp-cache.php:1442
+#: wp-cache.php:1524
 msgid "Directly Cached Files"
 msgstr ""
 
-#: wp-cache.php:1500
+#: wp-cache.php:1576
+msgid "Cannot delete directory"
+msgstr ""
+
+#: wp-cache.php:1585
 msgid "%s removed!"
 msgstr ""
 
-#: wp-cache.php:1508
+#: wp-cache.php:1593
 msgid ""
-"You must make %s writable to enable this feature. As this is a security risk "
-"please make it readonly after your page is generated."
+"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:1513
+#: 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:1528
+#: wp-cache.php:1613
 msgid "Existing direct page"
 msgstr ""
 
-#: wp-cache.php:1528
+#: wp-cache.php:1613
 msgid "Delete cached file"
 msgstr ""
 
-#: wp-cache.php:1533
+#: wp-cache.php:1618
 msgid "Add direct page:"
 msgstr ""
 
-#: wp-cache.php:1535
+#: 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:1537
+#: 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:1538
+#: 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:1543
+#: wp-cache.php:1628
 msgid "Update Direct Pages"
 msgstr ""
 
-#: wp-cache.php:1571
+#: wp-cache.php:1656
 msgctxt "timezone date format"
 msgid "Y-m-d G:i:s"
 msgstr ""
 
-#: wp-cache.php:1633
+#: wp-cache.php:1724
 msgid "Expiry Time &amp; Garbage Collection"
 msgstr ""
 
-#: wp-cache.php:1635
+#: wp-cache.php:1726
 msgid ""
 "<abbr title=\"Coordinated Universal Time\">UTC</abbr> time is <code>%s</code>"
 msgstr ""
 
-#: wp-cache.php:1638
+#: wp-cache.php:1729
 msgid "Local time is <code>%1$s</code>"
 msgstr ""
 
-#: wp-cache.php:1642
+#: wp-cache.php:1733
 msgid "Next scheduled garbage collection will be at <strong>%s UTC</strong>"
 msgstr ""
 
-#: wp-cache.php:1646
+#: wp-cache.php:1737
 msgid ""
 "Warning! <strong>PRELOAD MODE</strong> activated. Supercache files will not "
 "be deleted regardless of age."
 msgstr ""
 
-#: wp-cache.php:1663
+#: wp-cache.php:1755
 msgid "Cache Timeout"
 msgstr ""
 
-#: wp-cache.php:1664 wp-cache.php:1667
+#: wp-cache.php:1756 wp-cache.php:1759
 msgid "seconds"
 msgstr ""
 
-#: wp-cache.php:1665
+#: wp-cache.php:1757
 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:1666
+#: wp-cache.php:1758
 msgid "Scheduler"
 msgstr ""
 
-#: wp-cache.php:1666
+#: wp-cache.php:1758
 msgid "Timer:"
 msgstr ""
 
-#: wp-cache.php:1667
+#: wp-cache.php:1759
 msgid "Check for stale cached files every <em>interval</em> seconds."
 msgstr ""
 
-#: wp-cache.php:1668
+#: wp-cache.php:1760
 msgid "Clock:"
 msgstr ""
 
-#: wp-cache.php:1669
+#: wp-cache.php:1761
 msgid "HH:MM"
 msgstr ""
 
-#: wp-cache.php:1669
+#: wp-cache.php:1761
 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:1671
+#: wp-cache.php:1763
 msgid "Interval:"
 msgstr ""
 
-#: wp-cache.php:1677
+#: wp-cache.php:1769
 msgid "Notification Emails"
 msgstr ""
 
-#: wp-cache.php:1678
+#: wp-cache.php:1770
 msgid "Email me when the garbage collection runs."
 msgstr ""
 
-#: wp-cache.php:1680
+#: wp-cache.php:1772
 msgid "Garbage Collection"
 msgstr ""
 
-#: wp-cache.php:1681
+#: wp-cache.php:1773
 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:1682
+#: wp-cache.php:1774
 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:1683
+#: wp-cache.php:1775
 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:1684
+#: wp-cache.php:1776
 msgid ""
 "Use the <em>Timer</em> or <em>Clock</em> schedulers to define when the "
 "garbage collector should run."
 msgstr ""
 
-#: wp-cache.php:1685
+#: wp-cache.php:1777
 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:1686
+#: wp-cache.php:1778
 msgid ""
 "Or, the <em>Clock</em> scheduler allows the garbage collection to run at "
-"specific times. If set to run hourly or twicedaily the garbage collector "
+"specific times. If set to run hourly or twice daily, the garbage collector "
 "will be first scheduled for the time you enter here. It will then run again "
-"at the indicated interval. If set to run daily it will run once a day at the "
-"time specified."
+"at the indicated interval. If set to run daily, it will run once a day at "
+"the time specified."
 msgstr ""
 
-#: wp-cache.php:1688
+#: wp-cache.php:1780
 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:1690
+#: wp-cache.php:1782
 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:1691
+#: wp-cache.php:1783
 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:1692
+#: wp-cache.php:1784
 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:1693
+#: wp-cache.php:1785
 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:1695
+#: wp-cache.php:1787
 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 "
+"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 "
+"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."
 msgstr ""
 
-#: wp-cache.php:1696
+#: wp-cache.php:1788
 msgid "Set the expiry time to 0 seconds to disable garbage collection."
 msgstr ""
 
-#: wp-cache.php:1697
+#: wp-cache.php:1789
 msgid "Change Expiration"
 msgstr ""
 
-#: wp-cache.php:1741
+#: wp-cache.php:1833
 msgid "Rejected User Agents"
 msgstr ""
 
-#: wp-cache.php:1742
+#: wp-cache.php:1834
 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:1749
+#: wp-cache.php:1841
 msgid "Save UA Strings"
 msgstr ""
 
-#: wp-cache.php:1772
+#: wp-cache.php:1864
 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:1775
+#: wp-cache.php:1867
 msgid "Single Posts"
 msgstr ""
 
-#: wp-cache.php:1776
+#: wp-cache.php:1868
 msgid "Pages"
 msgstr ""
 
-#: wp-cache.php:1777
+#: wp-cache.php:1869
 msgid "Front Page"
 msgstr ""
 
-#: wp-cache.php:1778
+#: wp-cache.php:1870
 msgid "Home"
 msgstr ""
 
-#: wp-cache.php:1779
+#: wp-cache.php:1871
 msgid "Archives"
 msgstr ""
 
-#: wp-cache.php:1780
+#: wp-cache.php:1872
 msgid "Tags"
 msgstr ""
 
-#: wp-cache.php:1781
+#: wp-cache.php:1873
 msgid "Category"
 msgstr ""
 
-#: wp-cache.php:1782
+#: wp-cache.php:1874
 msgid "Feeds"
 msgstr ""
 
-#: wp-cache.php:1783
+#: wp-cache.php:1875
 msgid "Search Pages"
 msgstr ""
 
-#: wp-cache.php:1784
+#: wp-cache.php:1876
 msgid "Author Pages"
 msgstr ""
 
-#: wp-cache.php:1786 wp-cache.php:1898
+#: wp-cache.php:1878 wp-cache.php:1992
 msgid "Save"
 msgstr ""
 
-#: wp-cache.php:1803
+#: wp-cache.php:1895
 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 "
@@ -1666,51 +1703,51 @@ msgid ""
 "cache that page."
 msgstr ""
 
-#: wp-cache.php:1809
+#: wp-cache.php:1901
 msgid "Save Strings"
 msgstr ""
 
-#: wp-cache.php:1825
+#: wp-cache.php:1917
 msgid ""
 "Add here those filenames that can be cached, even if they match one of the "
 "rejected substring specified above."
 msgstr ""
 
-#: wp-cache.php:1831
+#: wp-cache.php:1923
 msgid "Save Files"
 msgstr ""
 
-#: wp-cache.php:1872
+#: wp-cache.php:1966
 msgid "Currently logging to: %s"
 msgstr ""
 
-#: wp-cache.php:1875
+#: wp-cache.php:1969
 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:1879
+#: wp-cache.php:1973
 msgid "Debugging"
 msgstr ""
 
-#: wp-cache.php:1880
+#: wp-cache.php:1974
 msgid "IP Address"
 msgstr ""
 
-#: wp-cache.php:1880
+#: wp-cache.php:1974
 msgid "(only log requests from this IP address. Your IP is %s)"
 msgstr ""
 
-#: wp-cache.php:1881
+#: wp-cache.php:1975
 msgid "Cache Status Messages"
 msgstr ""
 
-#: wp-cache.php:1882
+#: wp-cache.php:1976
 msgid "Display comments at the end of every page like this:"
 msgstr ""
 
-#: wp-cache.php:1888
+#: wp-cache.php:1982
 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 "
@@ -1718,7 +1755,7 @@ msgid ""
 "and the permalink structure is <em>/%category%/%postname%/</em>.</li></ol>"
 msgstr ""
 
-#: wp-cache.php:1889
+#: wp-cache.php:1983
 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 "
@@ -1726,92 +1763,133 @@ msgid ""
 "emailed if there is a problem."
 msgstr ""
 
-#: wp-cache.php:1891
+#: wp-cache.php:1985
 msgid "Check front page every 5 minutes."
 msgstr ""
 
-#: wp-cache.php:1892
+#: wp-cache.php:1986
 msgid "Front page text"
 msgstr ""
 
-#: wp-cache.php:1892
+#: wp-cache.php:1986
 msgid ""
-"Text to search for on your front page. If this text is missing the cache "
+"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:1893
+#: wp-cache.php:1987
 msgid "Clear cache on error."
 msgstr ""
 
-#: wp-cache.php:1894
+#: wp-cache.php:1988
 msgid "Email the blog admin when checks are made. (useful for testing)"
 msgstr ""
 
-#: wp-cache.php:1908
+#: wp-cache.php:2002
 msgid ""
-"Error: GZIP compression is enabled, disable it if you want to enable wp-"
+"Error: GZIP compression is enabled. Disable it if you want to enable wp-"
 "cache."
 msgstr ""
 
-#: wp-cache.php:1958 wp-cache.php:2099 wp-cache.php:2135
+#: wp-cache.php:2052 wp-cache.php:2351 wp-cache.php:2387
 msgid "Warning"
 msgstr ""
 
-#: wp-cache.php:1958
+#: wp-cache.php:2052
 msgid ""
 "GZIP compression is enabled in WordPress, wp-cache will be bypassed until "
 "you disable gzip compression."
 msgstr ""
 
-#: wp-cache.php:2020 wp-cache.php:2025 wp-cache.php:2058 wp-cache.php:2063
-#: wp-cache.php:2069
+#: wp-cache.php:2149 wp-cache.php:2155
+msgid "WP Super Cache Warning!"
+msgstr ""
+
+#: wp-cache.php:2150
+msgid ""
+"All users of this site have been logged out to refresh their login cookies."
+msgstr ""
+
+#: wp-cache.php:2156
+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. "
+"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."
+msgstr ""
+
+#: wp-cache.php:2158
+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:2161
+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:2163
+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:2167
+msgid "Logout"
+msgstr ""
+
+#: wp-cache.php:2271 wp-cache.php:2276 wp-cache.php:2310 wp-cache.php:2315
+#: wp-cache.php:2321
 msgid "Error"
 msgstr ""
 
-#: wp-cache.php:2020
+#: wp-cache.php:2271
 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:2025
+#: wp-cache.php:2276
 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:2058
+#: wp-cache.php:2310
 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."
+"writable by the Web server. Please delete it and refresh this page."
 msgstr ""
 
-#: wp-cache.php:2063
+#: wp-cache.php:2315
 msgid ""
 "Configuration file missing and %1$s  directory (<strong>%2$s</strong>) is "
-"not writable by the Web server.Check its permissions."
+"not writable by the web server. Check its permissions."
 msgstr ""
 
-#: wp-cache.php:2069
+#: wp-cache.php:2321
 msgid ""
-"Sample WP-Cache config file (<strong>%s</strong>) does not exist.Verify you "
-"installation."
+"Sample WP-Cache config file (<strong>%s</strong>) does not exist. Verify "
+"your installation."
 msgstr ""
 
-#: wp-cache.php:2099
+#: wp-cache.php:2351
 msgid "Could not update %s!</em> WPCACHEHOME must be set in config file."
 msgstr ""
 
-#: wp-cache.php:2135
+#: wp-cache.php:2387
 msgid "%s/advanced-cache.php</em> does not exist or cannot be updated."
 msgstr ""
 
-#: wp-cache.php:2136
-msgid "1. If it already exists please delete the file first."
+#: wp-cache.php:2388
+msgid "1. If it already exists, please delete the file first."
 msgstr ""
 
-#: wp-cache.php:2137
+#: wp-cache.php:2389
 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 "
@@ -1819,178 +1897,178 @@ msgid ""
 "again. (Change 777 to 755 in the previous command)"
 msgstr ""
 
-#: wp-cache.php:2138
+#: wp-cache.php:2390
 msgid "3. Refresh this page to update <em>%s/advanced-cache.php</em>"
 msgstr ""
 
-#: wp-cache.php:2139
+#: wp-cache.php:2391
 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:2140
+#: wp-cache.php:2392
 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:2163
+#: wp-cache.php:2415
 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 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>"
+"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>"
 msgstr ""
 
-#: wp-cache.php:2165
+#: wp-cache.php:2417
 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:2166
+#: wp-cache.php:2418
 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:2170
+#: wp-cache.php:2422
 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."
-"org/extend/plugins/wp-super-cache/faq/\">Troubleshooting Guide</a>. The "
-"WP_CACHE line must be moved up."
+"org/plugins/wp-super-cache/faq/\">Troubleshooting Guide</a>. The WP_CACHE "
+"line must be moved up."
 msgstr ""
 
-#: wp-cache.php:2198
+#: wp-cache.php:2450
 msgid "Cache Contents"
 msgstr ""
 
-#: wp-cache.php:2201
+#: wp-cache.php:2453
 msgid "Object cache in use. No cache listing available."
 msgstr ""
 
-#: wp-cache.php:2225
+#: wp-cache.php:2477
 msgid "Deleting supercache file: <strong>%s</strong><br />"
 msgstr ""
 
-#: wp-cache.php:2242
+#: wp-cache.php:2499
 msgid "Deleting wp-cache file: <strong>%s</strong><br />"
 msgstr ""
 
-#: wp-cache.php:2307
+#: wp-cache.php:2566
 msgid ""
 "Cache stats are not automatically generated. You must click the link below "
 "to regenerate the stats on this page."
 msgstr ""
 
-#: wp-cache.php:2308
+#: wp-cache.php:2567
 msgid "Regenerate cache stats"
 msgstr ""
 
-#: wp-cache.php:2310
+#: wp-cache.php:2569
 msgid "Cache stats last generated: %s minutes ago."
 msgstr ""
 
-#: wp-cache.php:2316
+#: wp-cache.php:2575
 msgid "WP-Cache"
 msgstr ""
 
-#: wp-cache.php:2317 wp-cache.php:2332
+#: wp-cache.php:2576 wp-cache.php:2591
 msgid "%s Cached Pages"
 msgstr ""
 
-#: wp-cache.php:2318 wp-cache.php:2337
+#: wp-cache.php:2577 wp-cache.php:2596
 msgid "%s Expired Pages"
 msgstr ""
 
-#: wp-cache.php:2331
+#: wp-cache.php:2590
 msgid "WP-Super-Cache"
 msgstr ""
 
-#: wp-cache.php:2341
+#: wp-cache.php:2600
 msgid "Fresh WP-Cached Files"
 msgstr ""
 
-#: wp-cache.php:2342 wp-cache.php:2358 wp-cache.php:2374 wp-cache.php:2390
+#: wp-cache.php:2601 wp-cache.php:2617 wp-cache.php:2633 wp-cache.php:2649
 msgid "URI"
 msgstr ""
 
-#: wp-cache.php:2342 wp-cache.php:2358
+#: wp-cache.php:2601 wp-cache.php:2617
 msgid "Key"
 msgstr ""
 
-#: wp-cache.php:2342 wp-cache.php:2358 wp-cache.php:2374 wp-cache.php:2390
+#: wp-cache.php:2601 wp-cache.php:2617 wp-cache.php:2633 wp-cache.php:2649
 msgid "Age"
 msgstr ""
 
-#: wp-cache.php:2342 wp-cache.php:2358 wp-cache.php:2374 wp-cache.php:2390
+#: wp-cache.php:2601 wp-cache.php:2617 wp-cache.php:2633 wp-cache.php:2649
 msgid "Delete"
 msgstr ""
 
-#: wp-cache.php:2357
+#: wp-cache.php:2616
 msgid "Stale WP-Cached Files"
 msgstr ""
 
-#: wp-cache.php:2373
+#: wp-cache.php:2632
 msgid "Fresh Super Cached Files"
 msgstr ""
 
-#: wp-cache.php:2389
+#: wp-cache.php:2648
 msgid "Stale Super Cached Files"
 msgstr ""
 
-#: wp-cache.php:2405
+#: wp-cache.php:2664
 msgid "Hide file list"
 msgstr ""
 
-#: wp-cache.php:2407
+#: wp-cache.php:2666
 msgid "Too many cached files, no listing possible."
 msgstr ""
 
-#: wp-cache.php:2409
+#: wp-cache.php:2668
 msgid "List all cached files"
 msgstr ""
 
-#: wp-cache.php:2412
+#: wp-cache.php:2671
 msgid ""
 "Expired files are files older than %s seconds. They are still used by the "
 "plugin and are deleted periodically."
 msgstr ""
 
-#: wp-cache.php:2423
+#: wp-cache.php:2682
 msgid "Delete Expired"
 msgstr ""
 
-#: wp-cache.php:2448
+#: wp-cache.php:2707
 msgid "Delete Super Cache cached files (opens in new window)"
 msgstr ""
 
-#: wp-cache.php:2595
+#: wp-cache.php:2874
 msgid "%1$s is Stephen Fry proof thanks to caching by %2$s"
 msgstr ""
 
-#: wp-cache.php:2628
+#: wp-cache.php:2907
 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:2634
+#: wp-cache.php:2913
 msgid "Settings"
 msgstr ""
 
-#: wp-cache.php:2644
+#: wp-cache.php:2923
 msgid ""
 "WP Super Cache is disabled. Please go to the <a href=\"%s\">plugin admin "
 "page</a> to enable caching."
 msgstr ""
 
-#: wp-cache.php:2647
+#: wp-cache.php:2926
 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-"
@@ -1999,146 +2077,146 @@ msgid ""
 "message."
 msgstr ""
 
-#: wp-cache.php:2668
+#: wp-cache.php:2947
 msgid "[%s] Front page is gzipped! Please clear cache!"
 msgstr ""
 
-#: wp-cache.php:2668
+#: wp-cache.php:2947
 msgid ""
 "Please visit %s to clear the cache as the front page of your site is now "
 "downloading!"
 msgstr ""
 
-#: wp-cache.php:2671
+#: wp-cache.php:2950
 msgid "[%s] Front page is gzipped! Cache Cleared!"
 msgstr ""
 
-#: wp-cache.php:2671
+#: wp-cache.php:2950
 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:2678
+#: wp-cache.php:2957
 msgid "[%s] Front page is not correct! Please clear cache!"
 msgstr ""
 
-#: wp-cache.php:2678
+#: wp-cache.php:2957
 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:2681
+#: wp-cache.php:2960
 msgid "[%s] Front page is not correct! Cache Cleared!"
 msgstr ""
 
-#: wp-cache.php:2681
+#: wp-cache.php:2960
 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:2686
+#: wp-cache.php:2965
 msgid "[%s] Front page check!"
 msgstr ""
 
-#: wp-cache.php:2686
+#: wp-cache.php:2965
 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:2729
+#: wp-cache.php:3008
 msgid "Cannot update .htaccess"
 msgstr ""
 
-#: wp-cache.php:2729
+#: wp-cache.php:3008
 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:2729
+#: wp-cache.php:3008
 msgid "Refresh this page when the file permissions have been modified."
 msgstr ""
 
-#: wp-cache.php:2729
+#: wp-cache.php:3008
 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:2733
+#: wp-cache.php:3012
 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:2734
-msgid "You can edit the file yourself add the following rules."
+#: wp-cache.php:3013
+msgid "You can edit the file yourself. Add the following rules."
 msgstr ""
 
-#: wp-cache.php:2735
+#: wp-cache.php:3014
 msgid " Make sure they appear before any existing WordPress rules. "
 msgstr ""
 
-#: wp-cache.php:2743
+#: wp-cache.php:3022
 msgid "Update Mod_Rewrite Rules"
 msgstr ""
 
-#: wp-cache.php:2906
+#: wp-cache.php:3185
 msgid "[%1$s] Cache Preload Started"
 msgstr ""
 
-#: wp-cache.php:2936
+#: wp-cache.php:3215
 msgid "[%1$s] Refreshing %2$s taxonomy from %3$d to %4$d"
 msgstr ""
 
-#: wp-cache.php:2982
+#: wp-cache.php:3264
 msgid "[%1$s] Refreshing posts from %2$d to %3$d"
 msgstr ""
 
-#: wp-cache.php:3003
+#: wp-cache.php:3285
 msgid "[%1$s] Cache Preload Stopped"
 msgstr ""
 
-#: wp-cache.php:3013
+#: wp-cache.php:3295
 msgid "[%1$s] %2$d posts refreshed"
 msgstr ""
 
-#: wp-cache.php:3013
+#: wp-cache.php:3295
 msgid "Refreshed the following posts:"
 msgstr ""
 
-#: wp-cache.php:3023
+#: wp-cache.php:3305
 msgid "Scheduling next preload refresh in %d minutes."
 msgstr ""
 
-#: wp-cache.php:3034
+#: wp-cache.php:3316
 msgid "[%s] Cache Preload Completed"
 msgstr ""
 
-#: wp-cache.php:3034
+#: wp-cache.php:3316
 msgid "Cleaning up old supercache files."
 msgstr ""
 
-#: wp-cache.php:3077
+#: wp-cache.php:3358
 msgid "[%s] Preload may have stalled."
 msgstr ""
 
-#: wp-cache.php:3077
+#: wp-cache.php:3358
 msgid ""
 "Preload has been restarted.\n"
 "%s"
 msgstr ""
 
-#: wp-cache.php:3120
+#: wp-cache.php:3401
 msgid "Supercache Uninstall Problems"
 msgstr ""
 
-#: wp-cache.php:3120
+#: wp-cache.php:3401
 msgid ""
 "Dear User,\n"
 "\n"
@@ -2153,9 +2231,29 @@ msgid ""
 "\n"
 "Regards,\n"
 "WP Super Cache Plugin\n"
-"http://wordpress.org/extend/plugins/wp-super-cache/"
+"http://wordpress.org/plugins/wp-super-cache/"
 msgstr ""
 
-#: wp-cache.php:3157
+#: wp-cache.php:3438
 msgid "Delete cache of the current page"
 msgstr ""
+
+#. Plugin Name of the plugin/theme
+msgid "WP Super Cache"
+msgstr ""
+
+#. Plugin URI of the plugin/theme
+msgid "https://wordpress.org/plugins/wp-super-cache/"
+msgstr ""
+
+#. Description of the plugin/theme
+msgid "Very fast caching plugin for WordPress."
+msgstr ""
+
+#. Author of the plugin/theme
+msgid "Automattic"
+msgstr ""
+
+#. Author URI of the plugin/theme
+msgid "https://automattic.com/"
+msgstr ""
-- 
GitLab