public/wordpress/wp-content/plugins/wp-courseware/includes/core/cache.php
/**
	 * Delete Version Transients.
	 *
	 * When the transient version increases, this is used to remove all past transients to avoid filling the DB.
	 *
	 * Note; this only works on transients appended with the transient version, and when object caching is not being used.
	 *
	 * @since 4.3.0
	 *
	 * @param string $version The version of the transient to remove.
	 */
Delete Version Transients.
When the transient version increases, this is used to remove all past transients to avoid filling the DB.

Note; this only works on transients appended with the transient version, and when object caching is not being used.



@param string $version The version of the transient to remove.
Delete Version Transients . When the transient version increases this is used to remove all past transients to avoid filling the DB . Note ; this only works on transients appended with the transient version and when object caching is not being used . @param string $version The version of the transient to remove .
public function delete_version_transients( $version = '' ) {
		if ( ! wp_using_ext_object_cache() && ! empty( $version ) ) {
			global $wpdb;
			$limit = apply_filters( 'wpcw_delete_version_transients_limit', 1000 );
			$affected = $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s ORDER BY option_id LIMIT %d;", '\_transient\_%' . $version, $limit ) );
			if ( $affected === $limit ) {
				wp_schedule_single_event( time() + 10, 'delete_version_transients', array( $version ) );
			}
		}
	}
public function delete_version_transients ( $ version = '' ) { if ( ! wp_using_ext_object_cache ( ) && ! empty ( $ version ) ) { global $ wpdb ; $ limit = apply_filters ( 'wpcw_delete_version_transients_limit' , 1000 ) ; $ affected = $ wpdb -> query ( $ wpdb -> prepare ( " DELETE FROM  { $ wpdb -> options }  WHERE option_name LIKE %s ORDER BY option_id LIMIT %d; " , '\_transient\_%' . $ version , $ limit ) ) ; if ( $ affected === $ limit ) { wp_schedule_single_event ( time ( ) + 10 , 'delete_version_transients' , array ( $ version ) ) ; } } }
Delete Version Transients.
Delete Version Transients .
// If affected rows is equal to limit, there are more rows to delete. Delete in 10 secs.