How performant is update_option relative to update_post_meta when updating on each post load?
Question
I've created an AJAX function that updates the views count of each post load.
public function updateViewCount()
{
// ...
$postID = $_REQUEST['post_id'];
$key = 'post_views_count';
$count = get_post_meta($postID, $key, true);
if ($count == '') {
$count
0
cron, database, transient, wp-cron
3 years
0 Answers
52 views