PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 6.0.3
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v6.0.3
6.0.3 6.0.2 6.0.1 6.0.0 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.7.9.2 5.7.9.1 5.7.8 5.7.9 5.7.6 5.7.7 5.7.5 5.7.4 5.7.3 5.7.2 5.7.1 trunk 5.6.0 5.6.1 All 34 releases
← All changes | includes/actions.php +11 -0 5.8.6 → 6.0.3 View file →
@@ -353,8 +353,16 @@
353 353 ct_reset_setup_table();
354 354 return $cache;
355 355 }
356 356
357 + $cache = get_transient( 'automatorwp_actions_in_use' );
358 +
359 + // If result is in a transient, return it
360 + if( is_array( $cache ) && count( $cache ) ) {
361 + ct_reset_setup_table();
362 + return $cache;
363 + }
364 +
357 365 $actions_in_use = array();
358 366 $results = $wpdb->get_results( "SELECT t.type FROM {$ct_table->db->table_name} AS t GROUP BY t.type" );
359 367
360 368 ct_reset_setup_table();
@@ -364,8 +372,11 @@
364 372 }
365 373
366 374 // Cache function result
367 375 automatorwp_set_cache( 'actions_in_use', $actions_in_use );
376 +
377 + // Store the result for a day
378 + set_transient( 'automatorwp_actions_in_use', $actions_in_use, HOUR_IN_SECONDS * 24 );
368 379
369 380 return $actions_in_use;
370 381
371 382 }