WordPress.org

Ready to get started?Download WordPress

Forums

Hyper Cache
Question on recent change (remove trailng slash) (4 posts)

  1. k12onos
    Member
    Posted 2 years ago #

    Hi,

    I just noticed that hyper cache plugin has an update to 2.9.0.

    When I read the changelog, there is something that i'm concerned with.

    remove the trailing slash for permalink (even if WordPress should send a redirect and Hyper Cache should already intercept it)

    What does that actually do? my permalink structure is /2012/06/postname/ (with a slash at the end).

    If I install this update, would it change my default permalink setting? Please explain more about this, thank you :)

    http://wordpress.org/extend/plugins/hyper-cache/

  2. fhoech
    Member
    Posted 2 years ago #

    Don't worry, this change will not interfere with your permalink structure. It's just used internally (the cache files are stored as md5 of the permalink). But, unfortunately there is a bug if you use "Cache invalidation mode: only modified posts", it won't invalidate modified posts if the permalink has a trailing slash (my bad, as I was the one who submitted that change - apologies). If you're comfortable in PHP, it's easy to fix though: Open plugin.php, go to line 185, it should read
    $link = substr($link, 7);
    and change it to
    $link = rtrim(substr($link, 7), '/');

  3. k12onos
    Member
    Posted 2 years ago #

    Hi, thanks for your reply.

    So, I should update to 2.9.0 AND then do the fix you posted here, am I correct?

    What would happen if I only updated to 2.9.0 without doing the fix?

  4. fhoech
    Member
    Posted 2 years ago #

    Actually, you can now just update to 2.9.0.1 which already has the fix.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic