SIGN IN SIGN UP

Real-time collaboration: Use prepared queries instead of *_post_meta functions.

Replaces add_post_meta/update_post_meta with wpdb->insert/wpdb->update.

This prevents a real-time editing session from invalidating WP_Query and various other post caches every few seconds. RTC stores awareness and sync information in post meta with high frequency. However, every call the *_post_meta functions invalidated post caches.

This commit avoids this frequent invalidation by removing the direct *_post_meta calls in favor of $wpdb calls.

Props czarate, mukesh27, paulkevan.

Developed in https://github.com/WordPress/wordpress-develop/pull/11325.
See #64696.



git-svn-id: https://develop.svn.wordpress.org/trunk@62099 602fd350-edb4-49c9-b593-d223f7449a82
A
Adam Zieliński committed
e77b83c574a3160401270acad7ea57f0f41df374
Parent: 8bf48cf