Support » Plugin: LiteSpeed Cache » Allow Editors to Purge All?

  • Resolved benz1

    (@benz1)


    Loving the plugin but is it possible to give Editors access to Purge All? Have noticed that re-ordering posts doesn’t show up until the cache is cleared.

    Also, I scheduled a purge of the home page on the Settings, Purge tab but after saving it, the URL changed to a / and the time disappeared. Is this correct?

    Thanks in advance.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Hai Zheng⚡

    (@hailite)

    Currently no. Can you tell how to re-order posts?

    Scheduled Purge Time should not disappear. Please check if you typed it correctly.

    Thread Starter benz1

    (@benz1)

    Thanks for your speedy response.

    We’re using the Posts Types Order plugin (https://wordpress.org/plugins/post-types-order/) to re-order posts.

    Re the scheduled time, I didn’t realize the third field in the time was an AM/PM selector. I thought it was for seconds and wouldn’t let me enter a value but just realized than you need to arrow up or down to select AM or PM. It’s now saving the time with a / for the home page URL.

    Plugin Support Hai Zheng⚡

    (@hailite)

    Thanks for the plugin name. That cache purge process is not supposed to be done manually. That is something we or Post Types Order plugin should do for users.

    We have added it into our schedule. Will figure out a solution for it. Thanks for feedback.

    Hai

    Thread Starter benz1

    (@benz1)

    Cool, thanks. Much appreciated.

    Plugin Support Hai Zheng⚡

    (@hailite)

    We have informed Posts Types Order dev team on how to do the purge action. After checked their code, the best way is they add the purge action in their code. Once we get any feedback, will update here.

    You can also do this manually to make it work for now:

    Steps:

    In post-types-order/include/class.cpto.php,

    1. Line 440, above it, add
    this code:

    if( method_exists( 'LiteSpeed_Cache_API', 'purge_all' ) ) {
        LiteSpeed_Cache_API::purge_all() ;
    }

    2. Same to Line 370.

    Regards,
    Hai

    Thread Starter benz1

    (@benz1)

    Wow, thank you! Now that’s what I call good service and definitely calls for a 5* rating! Just added the line and it works perfectly! 🙂

    Thank you again, much appreciated.

    Plugin Support Hai Zheng⚡

    (@hailite)

    Enjoy caching.

    Thanks for review.

    Hi Everyone,
    I’am the support guy for Post Types Order plugin.
    Please add the following code to your theme functions.php file:

        function pto_order_update_complete( ) 
            {
                if( method_exists( 'LiteSpeed_Cache_API', 'purge_all' ) ) {
                        LiteSpeed_Cache_API::purge_all() ;
                    }
            }
        add_action( 'PTO/order_update_complete', 'pto_order_update_complete' );

    This filter is available for Post Types Order version 1.9.3.6 and up.

    Plugin Support Hai Zheng⚡

    (@hailite)

    Hi @tdgu,

    Thanks for your reply. You did a good job. We will add your plugin to our compatible list once we see your 1.9.3.6 released and passed our test.

    Thanks,
    Hai

    Plugin Support Hai Zheng⚡

    (@hailite)

    @tdgu Well, just misread your post. We are not a theme and don’t have a function.php file.

    I think it may be a better idea to add this on utility app level than on cache level.

    What is your opinion? Thanks.

    Maya

    (@tdgu)

    I’ve included such cache clear trigger on our plugin, it will be available for the next version.

    Thread Starter benz1

    (@benz1)

    Thanks @tdgu 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Allow Editors to Purge All?’ is closed to new replies.