Delete a WordPress transient from a shortcode on Page/Post update
If you will save all data of shortcodes in one variable, you can reset it easy. Example somewhere in shortcode(pseudocode): $page_cache = get_transient(“page_{$page_id}”); if ( empty($page_cache ) ){ global $shortcode_index; $page_cache[$shortcode_index] = **some data that cached**; set_transient( “page_{$page_id}”, $page_cache, **some time** ); $shortcode_index++; **** } And then you can delete it just by page_id on … Read more