Support » Plugin: Companion Auto Update » Clear Cache after updating Plugins

  • Resolved Torsten

    (@knodderdachs)


    Hi Papin,

    I’m using Cache Enabler plugin by KeyCDN to speed up my website. The plugin is set up to clear the cache whenever a plugin gets updated. That works for updating plugins manually but not if they’re getting updated by Companion Auto Update.

    Could you please add this functionality to the plugin or is there a possibility that I’ve overseen?

    ATB
    Torsten

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Papin Schipper

    (@papin)

    I think the best way would be to hook Cache Enabler to Companion Auto Update.

    function clear_cache() {
    	if (has_action('ce_clear_cache')) {
        		do_action('ce_clear_cache');
    	}
    }
    add_action( 'cau_after_plugin_update', 'clear_cache' );

    From my understanding this should work, the action ‘cau_after_plugin_update’ is run after every plugin update done by Companion Auto Update and the ‘ce_clear_cache’ action is what should clear all the cache.

    Torsten

    (@knodderdachs)

    OK thanks, I’ll report back if that shouldn’t work.

    ATB
    Torsten

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.