Support » Plugin: WP Super Cache » Fixed: delete individual pages from cache

  • 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 “” look more appealing than “”

    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/” 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Greetings Donncha.
    I noticed this hasn’t yet been fixed in the latest releases.
    Just a reminder.
    Thank you again, for this great plugin.

    Plugin Author Donncha O Caoimh


    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.