public function cache_flush_pods( $pod = null ) {

		/**
		 * @var $wpdb wpdb
		 */
		global $wpdb;

		pods_transient_clear( 'pods' );
		pods_transient_clear( 'pods_components' );

		if ( null !== $pod && is_array( $pod ) ) {
			pods_transient_clear( 'pods_pod_' . $pod['name'] );
			pods_cache_clear( $pod['name'], 'pods-class' );

			foreach ( $pod['fields'] as $field ) {
				pods_transient_clear( 'pods_field_' . $pod['name'] . '_' . $field['name'] );
			}

			if ( in_array( $pod['type'], array( 'post_type', 'taxonomy' ) ) ) {
				pods_transient_clear( 'pods_wp_cpt_ct' );
			}
		} else {
			pods_transient_clear( 'pods_wp_cpt_ct' );
		}

		// Delete transients in the database
		$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_pods%'" );
		$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_timeout_pods%'" );

		// Delete Pods Options Cache in the database
		$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_pods_option_%'" );

		pods_cache_clear( true );

		pods_transient_set( 'pods_flush_rewrites', 1 );

		do_action( 'pods_cache_flushed' );
	}