wpsc_feed_update()WPSCache 1.0

Delete feeds when the site is updated so that feed files are always fresh

No Hooks.

Return

null. Nothing (null).

Usage

wpsc_feed_update( $type, $permalink );
$type (required)
-
$permalink (required)
-

wpsc_feed_update() code WPSCache 1.12.0

function wpsc_feed_update( $type, $permalink ) {
	$wpsc_feed_list = get_option( 'wpsc_feed_list' );

	update_option( 'wpsc_feed_list', array() );
	if ( is_array( $wpsc_feed_list ) && ! empty( $wpsc_feed_list ) ) {
		foreach( $wpsc_feed_list as $file ) {
			wp_cache_debug( "wpsc_feed_update: deleting feed: $file" );
			prune_super_cache( $file, true );
			prune_super_cache( dirname( $file ) . '/meta-' . basename( $file ), true );
		}
	}
}