• When using HTTPS, the cache files are names index-https.html and index-https.html.gz, rather than index.html and index.html.gz. This causes two problems:

    – On the ‘Contents’ page, when the file list is shown, two entries for each cached file appear.

    – The encoded URI in the ‘X’ link to delete the file is incorrect – it includes the ‘index-https.html(.gz)’ where it should just contain the directory name.

    Patch for wp-cache.php:

    --- wp-cache-original.php	2014-02-25 16:22:48.000000000 +0000
    +++ wp-cache.php	2014-03-17 12:24:24.000000000 +0000
    @@ -2225,6 +2225,8 @@
     			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' );
    +            @unlink( $cache_path . 'supercache/' . $supercacheuri . 'index-https.html' );
    +            @unlink( $cache_path . 'supercache/' . $supercacheuri . 'index-https.html.gz' );
     			prune_super_cache( $cache_path . 'supercache/' . $supercacheuri . 'page', true );
     			@rmdir( $cache_path . 'supercache/' . $supercacheuri );
     		}
    @@ -2468,11 +2470,11 @@
     			if ( $wp_cache_preload_on == false && $cache_max_time > 0 && $filem + $cache_max_time <= $now ) {
     				$sizes[ 'expired' ]+=1;
     				if ( $valid_nonce && $_GET[ 'listfiles' ] )
    -					$sizes[ 'expired_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1;
    +					$sizes[ 'expired_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', str_replace( 'index-https.html', '', str_replace( 'index-https.html.gz', '', $directory ) ) ) ) ) ] = 1;
     			} else {
     				$sizes[ 'cached' ]+=1;
     				if ( $valid_nonce && array_key_exists('listfiles', $_GET) && $_GET[ 'listfiles' ] )
    -					$sizes[ 'cached_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1;
    +					$sizes[ 'cached_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', str_replace( 'index-https.html', '', str_replace( 'index-https.html.gz', '', $directory ) ) ) ) ) ] = 1;
     			}
     			if ( ! isset( $sizes[ 'fsize' ] ) )
     				$sizes[ 'fsize' ] = @filesize( $directory );

    https://www.ads-software.com/plugins/wp-super-cache/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Super Cache] Cannot delete cache files when using https’ is closed to new replies.