| @@ -126,9 +126,14 @@ | ||
| 126 | 126 | * |
| 127 | 127 | * @param array $meta New meta data. |
| 128 | 128 | */ |
| 129 | 129 | protected function update_meta( $meta ) { |
| 130 | - update_post_meta( $this->post_id, static::META_KEY, $meta ); | |
| 130 | + $is_updated = update_post_meta( $this->post_id, static::META_KEY, $meta ); | |
| 131 | + | |
| 132 | + // When a concurrent request already stored the identical value, WP reports no change and skips its meta cache invalidation. | |
| 133 | + if ( ! $is_updated ) { | |
| 134 | + wp_cache_delete( $this->post_id, 'post_meta' ); | |
| 135 | + } | |
| 131 | 136 | } |
| 132 | 137 | |
| 133 | 138 | /** |
| 134 | 139 | * Delete meta. |