Hi @ulicgn,
(I have received an email notification that you had also posted in this thread. I’m not sure why your post is not showing up, so that my reply below is to the text that I had received in the email.)
You are right, the caching is intentional, and it is more of a caching invalidation problem. Apparently, the transient is not properly cleared on circusstrategic’s site.
The idea of this caching is to cache the rendered HTML output of the table (actually the md5 hashed full table Shortcode) in a transient, so that the HTML generation process does not have to be repeated on every page load (it can be potentially computationally expensive, due to formula and Shortcode evaluation). The caching is however skipped for logged-in users and if the cache_table_output
parameter is set (which can also be done globally with this TablePress Extension).
The cache is either flushed every day (when the transient expires) or whenever the table is edited/saved. This works by having another transient that contains a list of all transients with cached versions for this table, which are then all invalidated.
Now, in your case, this flushing does not happen, because wp_update_post( $post_id_of_table)
is a “lower level function” than the cache flushing. Therefore, if you want to update content programmatically, I would actually not recommend modifying the internal post data, but to use the TablePress functions from model-table.php (I think the controller-admin-ajax.php shows how to do this nicely, in the ajax_action_save_table()
method.). This would include the cache flushing and would also be more future-proof, in case anything changes in the internal data storage mechanism in the future.
Best wishes,
Tobias