• Resolved Andrew Wilder

    (@eatingrules)


    Hi,

    It would be great if the “Clear Cache” checkbox (in Sucuri > Firewall (WAF) > Clear Cache) could be enabled by default.

    That would save a couple of extra steps during plugin setup – and I think also help people with troubleshooting, if they don’t realize the cache should be cleared after posts/pages are updated.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • This option was already on by default in previous versions of the plugin.

    Many — MANY — people complained to me saying that it was a bad default value because in many cases they were publishing/editing multiple articles through out the day, which obviously would cause the automatic refresh of the cache, consequently making their websites slow (until the cache was regenerated). I decided to revert this option to reduce the number of tickets, that way I can focus on writing code rather than resolving tickets.

    I will consider to reimplement this option by leveraging a new API endpoint in our Firewall that allows to specify which page we want to flush the cache, that way when you edit a page the plugin will only request the refresh of that specific page rather than the entire website.

    However, there are many edge cases that I need to take in consideration before writing the code, this is easy for the “edit” action, but when you create a new page there is no URL to refresh, and depending on how the layout of the website was implemented the plugin may need to request the refresh of the home page, the internal post listing, custom pages defined by the webmaster, etc.

    I will move this into our internal issue tracker and let my project manager decide when to implement this feature. Once I finish my work in other tasks that have a high priority I will move into this. Thank you for the suggestion.

    Thread Starter Andrew Wilder

    (@eatingrules)

    Thanks yorman, I appreciate your thorough reply.

    Here’s an idea as a quick workaround: What about checking for a constant in wp-config.php? I mention it because, as a part of my setup process, I have several constants I always add to wp-config.php (and I usually do so before installing Sucuri)… so I could cut & paste this in with everything else, and it would be no extra steps.

    Something like this:

    define ( SUCURI_CLEAR_CACHE_ON_PUBLISH', true );

    Thanks,
    Andrew

    Sure, why not.

    Here is the implementation [1].

    Feel free to install the development version of the code from here [2] or wait until the official release of the next version of the plugin, this will happen in a couple of weeks, so if you need an immediate solution I suggest you to download the code from the development repository. My co-workers will conduct a QA test and we will release the update when all my changes are reviewed, not only this one but also other changes implemented since the last update.

    [1] https://github.com/cixtor/sucuri-wordpress-plugin/commit/cb1cd3e
    [2] https://github.com/cixtor/sucuri-wordpress-plugin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enable “Clear Cache” option by default’ is closed to new replies.