• Resolved diamantweb

    (@diamantweb)


    Hello Marko,

    What is the functionality behind of “Purge current page”? As I assume, by hitting the button I can get a particular page free of cache. That is, whenever I do any changes on a page I have a posibility to purge its cache. Lets say, I change a price for a product, to update it on front, on the page, which was cached before, I click “Purge current page” then I expect the full page should be clean. Hovewer, if to stick such assumption, I can state the functionality doent work as outlined or I am wrong concerning “Purge current page” at all?

    Waldemar

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @diamantweb

    Thank you for your inquiry and I am happy to assist you with this.
    “Purge current page” only clear cache for the post ID.
    If you want to purge the entire page you can use w3tc_flush_url($url)
    Thank you!

    Thread Starter diamantweb

    (@diamantweb)

    Hello Marko,
    would you give me instructions of how and where to insert the given string?

    Waldemar

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @diamantweb

    w3tc_flush_url($url) is a filter that you can use to call the URL to be flushed.
    In wp-contet/plugins/w3-total-cache/CacheFlush_Locally.php you can find the actions to flush the cache.
    on line 211:

     * Purges/Flushes url from page cache, varnish and cdn cache
    	 */
    	function flush_url( $url, $extras = null ) {
    		$do_flush = apply_filters( 'w3tc_preflush_url', true, $extras );
    		if ( $do_flush )
    			do_action( 'w3tc_flush_url', $url, $extras );

    YOu need to call w3tc_flush_url($url) E.G. w3tc_flush_url(‘http://domain.com/page/’);

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Purge current page’ is closed to new replies.