• Greetings Donncha and thank you for WP Super Cache.
    I think “Small is Beautiful”, so I choose it over other more complex caching plugins.

    One glitch, however, has been bugging me ever since. The button on the admin bar to delete individual pages never works.

    I use permalink structures without trailing slash (Ex: /%year%/%monthnum%/%postname%).
    URLs like “https://example.com/about” look more appealing than “https://example.com/about/”

    So i dig the code and found the problem. On line 385 in “wp-cache.php”, you assume the permalink structure always ends with a slash:

    $path = get_supercache_dir() . preg_replace( '/:.*$/', '', $_GET[ 'path' ] );

    Because i dont use trailing slashes the plugin was looking for something like “/var/www/multisite-network.com/wp-content/cache/supercache/example.com/2013/04/somepageindex.html” to delete when “prune_super_cache( $path . $cache_file, true );” was called on line 388.

    So the simple and obvious solution was to use the trailingslashit function on line 385, which is precisely for what this WordPress function was created:

    $path = trailingslashit( get_supercache_dir() . preg_replace( '/:.*$/', '', $_GET[ 'path' ] ) );

    I hope you fix this in an upcoming version.

    Thank you and best regards.

    Gon?alo Peres

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Gon?alo Peres

    (@gonperesgmailcom)

    Greetings Donncha.
    I noticed this hasn’t yet been fixed in the latest releases.
    Just a reminder.
    Thank you again, for this great plugin.

    Thanks Gon?alo, I missed that code but I’ve just checked it into trunk so the development version will update in the next 20 minutes.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fixed: delete individual pages from cache’ is closed to new replies.