Forums

[resolved] [Plugin: WP Super Cache] Please add bad Behavior code to WP-Super-Cache! (10 posts)

  1. ljmac
    Member
    Posted 3 years ago #

    Hi Donncha,

    WP-Super-Cache must be one of the most essential and most frequently updated plug-ins for WordPress - great stuff! However, those frequent updates do lead to a practical issue for those of us who also use Bad Behavior - we have to add its compatibility code to wp-cache-phase1.php every time.

    But as this code doesn't cause any issues for those who don't use Bad Behavior, why not add it to the standard WP-Super-Cache code? There's already a lot of other compatibility code in there after all.

  2. Donncha O Caoimh
    Member
    Posted 3 years ago #

    Hmm, That is an awful hack. It would be better to put it a cache_action there rather than that so other plugin writers can write their own plugins to get around the cache.

    I'll see about adding that before the next release.

  3. ljmac
    Member
    Posted 3 years ago #

    It doesn't seem to cause any problems, but of course if you could come up with a more elegant and flexible solution that would be even better!

    Still, would your solution require and update to Bad Behavior, or will it continue to work as it is?

  4. linickx
    Member
    Posted 3 years ago #

    I'd like to vote for this :)

  5. webmaestro
    Member
    Posted 3 years ago #

    I'd like to 'vote' for adding a checkbox to insert the Bad Behavior fix, if it's not too egregious:

    Edit the wp-content/plugins/wp-cache/wp-cache-phase1.php or wp-content/plugins/wp-super-cache/wp-cache-phase1.php file and find the following two lines at around line 34 (line 56 in WP Super Cache):

    if (! ($meta = unserialize(@file_get_contents($meta_pathname))) )
        return;

    Immediately after this, insert the following line:

    require_once( ABSPATH . 'wp-content/plugins/bad-behavior/bad-behavior-generic.php');

    I suspect putting in a cache_action so other plugin writers can write their own plugins to get around the cache would be more elegant as well. However, it might make sense to do both (although it'd likely require some extra code to ensure folks don't somehow activate both measures).

  6. ljmac
    Member
    Posted 3 years ago #

    We've had a couple more Super Cache updates now and Donncha hasn't added this code yet - oh well, I guess we'll have to keep doing it manually!

  7. desean
    Member
    Posted 3 years ago #

    I would like to vote for this as well.

    With the regular updates for WP Super Cache, users of both WP Super Cache and Bad Behavior have to edit the file manually which isn't practical in the long run.

    May I suggest that the compatibility code be added to wp-cache-phase1.php first, then introduce the cache_action method later (and remove the compatibility code) when it is ready?

  8. ljmac
    Member
    Posted 3 years ago #

    I heartily agree with this suggestion!

  9. Donncha O Caoimh
    Member
    Posted 3 years ago #

    Try the development version. I'm looking for testers to try out the new BB plugin I added: http://ocaoimh.ie/2009/02/04/want-to-test-the-new-wp-super-cache/

  10. ljmac
    Member
    Posted 2 years ago #

    Although it has already been covered in another similar thread, I thought I should update this one to show that Donncha's plug-in does indeed work!

Topic Closed

This topic has been closed to new replies.

About this Topic