• Resolved Gal Baras

    (@galbaras)


    Hey Emre,

    I love your plugin and have used it for a long time.

    However, when you introduce new features into it, it’s a good idea to default to the existing behaviour and provide a way to turn the new features on, instead of activating them by default and requiring changes to wp-config.php to go back to the way things were before.

    To me, clearing caches on order creation or order status change mean that the site is cleared too often. The more active a site is, the more pages will be generated dynamically, and that’s not a good thing.

    So I think these features should have been provided as options that can be turned on by those who want them, while plugin behaviour remains the same for those who don’t. I also think that PHP constants are difficult to add when you manage many sites, whereas filters can be added via a feature plugin to multiple sites.

    Best regards,
    Gal

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Emre Vona

    (@emrevona)

    Hi Gal, I changed the feature but I did not remove the previous constant (WPFC_DISABLE_CLEARING_CACHE_AFTER_WOOCOMMERCE_CHECKOUT_ORDER_PROCESSED) for you 🙂 you can check the code.

    https://plugins.trac.wordpress.org/browser/wp-fastest-cache/trunk/wpFastestCache.php#L132

    Thread Starter Gal Baras

    (@galbaras)

    That’s not what I meant.

    Before you introduced cache clearing based on order creation, the cache was not cleared when an order was created. Making the plugin clear the cache unless there was a constant that PREVENTS it changes that behaviour.

    To remain backward compatible, you should have provided a new constant to TRIGGER cache clearing on order creation, not to prevent it. This would have kept existing sites working in the same way, and if anyone wanted the new feature, they could add the new constant.

    The same goes for WPFC_DISABLE_CLEARING_CACHE_AFTER_WOOCOMMERCE_ORDER_STATUS_CHANGED.

    I hope this is clearer.

    Plugin Author Emre Vona

    (@emrevona)

    The most important thing is the least error. Clearing 2-3 pages does not slow down the server but Not clearing 2-3 pages may cause a critical issue.

    Thread Starter Gal Baras

    (@galbaras)

    I don’t think that not clearing caches when an order is created is an error. I think it’s a choice, and depends very much on the individual site.

    Plugin Author Emre Vona

    (@emrevona)

    When the cache is not cleared, the stock count is out of date. This can sometimes be a big problem for users.

    Thread Starter Gal Baras

    (@galbaras)

    It may be a problem for SOME users, but when you add a feature other users don’t want, it creates a new problem for them.

    Anyway, it’s just something I’m asking you to keep in mind when adding something to the plugin that requires active disabling. So now you know.

    Plugin Author Emre Vona

    (@emrevona)

    thank you so much. You always contribute to improving the product.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Backward compatible changes’ is closed to new replies.