• Resolved ljmac

    (@ljmac)


    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • 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.

    Thread Starter ljmac

    (@ljmac)

    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?

    I’d like to vote for this ??

    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).

    Thread Starter ljmac

    (@ljmac)

    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!

    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?

    Thread Starter ljmac

    (@ljmac)

    I heartily agree with this suggestion!

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

    Thread Starter ljmac

    (@ljmac)

    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!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: WP Super Cache] Please add bad Behavior code to WP-Super-Cache!’ is closed to new replies.