• Resolved seprita

    (@digitohter)


    Most of cache plugins have option “clear all cache files when post or page is published”. This affects also saving post or page after editing.

    Is that possible to make Tablepress table saving act like post or page saving? Then cache will be cleared automatically after table editing. In some cases tables will handle most of post/page important content, threof table editing is more frequent than post/page editing what contains this table.

    Maybe I’m asking something impossible, but clearing cache manually after every table change is not very good solution. If I forget doing this, visitors are not seeing changed table content.

    Thank You and greetings from snowy Estonia! 🙂

    https://ww.wp.xz.cn/plugins/tablepress/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    TablePress does actually do this already, for four very popular caching plugins, see this code: https://github.com/TobiasBg/TablePress/blob/master/models/model-table.php#L688
    The plugins are W3 Total Cache, WP Super Cache, Cachify, and Quick Cache. Which one are you using?

    Regards,
    Tobias

    Thread Starter seprita

    (@digitohter)

    Thank You for answer!

    Before I use WP Super Cache, but now WP Fastest Cache: https://ww.wp.xz.cn/plugins/wp-fastest-cache/

    It’s a new rising star, very easy to use and really makes site very fast.

    Can You add clearing cache compatibility for this plugin? WP Fastest Cache is pretty popular already.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, that explains it 🙂 I hadn’t seen that plugin before.

    Sure, adding support for this should not be a problem, if it offers a PHP function that other plugins can call to clear the cache.
    I couldn’t find documenation on the plugin, so can you maybe find out from the plugin author which function should be used for this? I’ll then gladly add support for it in TablePress.

    Regards,
    Tobias

    Thread Starter seprita

    (@digitohter)

    I will ask from plugin author and will let You know.

    Thank You for the kind support! 🙂

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sounds great!

    Regards,
    Tobias

    Thread Starter seprita

    (@digitohter)

    I got answer from the plugin author:

    if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
    $GLOBALS['wp_fastest_cache']->deleteCache();
    }
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    great, that’s perfect!

    I’ll add this to TablePress in the next version. Meanwhile, you could simply add this to the function in the model-table.php file that I linked to above.

    Best wishes,
    Tobias

    Thread Starter seprita

    (@digitohter)

    I added this script to model-table.php and it works.

    Thank You, Tobias!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    great! Thanks a lot for even testing it! 🙂

    Best wishes,
    Tobias

    Thread Starter seprita

    (@digitohter)

    That was a least I can do 🙂

    Together and with co-operation we can make WordPress even more powerful and flexible platform!

    Have a nice day!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    most definitely! That’s what Open Source is about! 🙂

    Best wishes,
    Tobias

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

The topic ‘Clear cache when table is saved’ is closed to new replies.