Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    There is a way by calling a PHP function directly. Additionally, the cache clears itself every 12 hours.

    Can you please explain why you want to clear the cache manually? What your use case of such a button here?

    Regards,
    Tobias

    Thread Starter marketing guy

    (@el-terrible-bmw)

    Hey thanks for the response.

    What is the timestamp that the 12 hours is calculated against? Would 10 different tables all be cleared at different times?

    I have additional code that loads before and after tables such as ads and some extra functionality I developed, and every time I make a slight change, it doesn’t take effect until table cache is cleared. I am accomplishing that by using the “tablepress_table_output” filter, but maybe there’s a better way to do that so it doesn’t cache that part?

    And I wouldn’t mind re-saving the tables, but then that changes the last edited timestamps which I am using for other things such as last 10 edited tables, which skews that part up since technically I didn’t edit the information in the tables.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the explanation. Well, if you are adding other content with the tablepress_table_output filter hook, the best way here might be to just turn off the output caching.
    For details on that, please take a look at https://wordpress.org/support/topic/maxbuttons-css-stopped-working-in-tablepress?replies=6

    Regards,
    Tobias

    Thread Starter marketing guy

    (@el-terrible-bmw)

    Thanks Tobias.

    I did actually find that and was contemplating using it, but my tables are pretty long so I figured having caching on is not such a bad idea. heh.

    I think I’ll just wait for it to reset itself since I’m not in a rush. Also, regarding my other question, does cache reset at the same time for all tables, or does each table have it’s own time keeping at which that 12 hour reset is done? Just want to know for my curiosity.

    Thanks again for the awesome plugin. Easily one of my favorite WordPress plugins and probably the best support.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    argh, sorry, I didn’t mean to ignore that other question…
    No, the caches won’t be cleared all at the same time. The cache is basically always valid for a day (the 12 hours that I mentioned where wrong… I had increased the cache time a while ago…) after its last creation. The timepoint of that changes e.g. when the table is saved, but also when the cache of a table expires but is not refreshed immediately (because the table is not viewed by a visitor).

    To clear the caches programmatically, you could maybe use the PHP function

    TablePress::$model_table->invalidate_table_output_caches();

    somewhere…

    Regards,
    Tobias

    Thread Starter marketing guy

    (@el-terrible-bmw)

    Ok sounds great. Thanks for the explanation.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Clearing TablePress Cache’ is closed to new replies.