Index: wp-includes/class-wp-feed-cache-transient.php
===================================================================
--- wp-includes/class-wp-feed-cache-transient.php	(revision 47399)
+++ wp-includes/class-wp-feed-cache-transient.php	(working copy)
@@ -12,7 +12,7 @@
  *
  * @since 2.8.0
  */
-class WP_Feed_Cache_Transient {
+class WP_Feed_Cache_Transient implements SimplePie_Cache_Base {
 
 	/**
 	 * Holds the transient name.
@@ -33,12 +33,10 @@
 	/**
 	 * Holds the cache duration in seconds.
 	 *
-	 * Defaults to 43200 seconds (12 hours).
-	 *
-	 * @since 2.8.0
+	 * @since 5.5.0
 	 * @var int
 	 */
-	public $lifetime = 43200;
+	public $lifetime;
 
 	/**
 	 * Constructor.
@@ -51,22 +49,33 @@
 	 * @param string $extension 'spi' or 'spc'.
 	 */
 	public function __construct( $location, $filename, $extension ) {
-		$this->name     = 'feed_' . $filename;
-		$this->mod_name = 'feed_mod_' . $filename;
+		$options = $this->parse_location( $location );
 
-		$lifetime = $this->lifetime;
-		/**
-		 * Filters the transient lifetime of the feed cache.
-		 *
-		 * @since 2.8.0
-		 *
-		 * @param int    $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
-		 * @param string $filename Unique identifier for the cache object.
-		 */
-		$this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $filename );
+		$this->lifetime = $options['extras']['lifetime'];
+
+		$this->name     = 'feed_' . md5( "$filename:$extension" );
+		$this->mod_name = 'feed_mod_' . md5( "$filename:$extension" );
 	}
 
 	/**
+	 * Parsing cache location.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @param string $location  URL location (scheme is used to determine handler).
+	 * @return array $params.
+	 */
+	public function parse_location( $location ) {
+		$params = parse_url( $location );
+		$params['extras'] = array();
+		if ( isset( $params['query'] ) )
+		{
+			parse_str( $params['query'], $params['extras'] );
+		}
+		return $params;
+	}
+
+	/**
 	 * Sets the transient.
 	 *
 	 * @since 2.8.0
Index: wp-includes/class-wp-feed-cache.php
===================================================================
--- wp-includes/class-wp-feed-cache.php	(revision 47399)
+++ wp-includes/class-wp-feed-cache.php	(working copy)
@@ -16,10 +16,23 @@
  */
 class WP_Feed_Cache extends SimplePie_Cache {
 
+	protected static $handlers = array(
+		'wordpress' => 'WP_Feed_Cache_Transient',
+	);
+
 	/**
+	 * Should be deprecated in SimplePie 1.3.1 but still using it
+	 *
+	 * so keeping both functions for backward compatibility
+	 */
+	public function create( $location, $filename, $extension ) {
+		return self::get_handler($location, $filename, $extension);
+	}
+
+	/**
 	 * Creates a new SimplePie_Cache object.
 	 *
-	 * @since 2.8.0
+	 * @since 5.5.0
 	 *
 	 * @param string $location  URL location (scheme is used to determine handler).
 	 * @param string $filename  Unique identifier for cache object.
@@ -26,7 +39,7 @@
 	 * @param string $extension 'spi' or 'spc'.
 	 * @return WP_Feed_Cache_Transient Feed cache handler object that uses transients.
 	 */
-	public function create( $location, $filename, $extension ) {
+	public static function get_handler( $location, $filename, $extension ) {
 		return new WP_Feed_Cache_Transient( $location, $filename, $extension );
 	}
 }
Index: wp-includes/feed.php
===================================================================
--- wp-includes/feed.php	(revision 47399)
+++ wp-includes/feed.php	(working copy)
@@ -749,6 +749,17 @@
  * @return SimplePie|WP_Error SimplePie object on success or WP_Error object on failure.
  */
 function fetch_feed( $url ) {
+	/**
+	 * Filters the transient lifetime of the feed cache.
+	 *
+	 * @since 2.8.0
+	 *
+	 * @param int    $lifetime Cache duration in seconds. Default is 43200 seconds (12 hours).
+	 * @param string $filename Unique identifier for the cache object.
+	 */
+
+	$lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url );
+
 	if ( ! class_exists( 'SimplePie', false ) ) {
 		require_once ABSPATH . WPINC . '/class-simplepie.php';
 	}
@@ -760,17 +771,13 @@
 
 	$feed = new SimplePie();
 
-	$feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
-	// We must manually overwrite $feed->sanitize because SimplePie's
-	// constructor sets it before we have a chance to set the sanitization class.
-	$feed->sanitize = new WP_SimplePie_Sanitize_KSES();
+	$feed->registry->register( 'File',  'WP_SimplePie_File', true );
+	$feed->registry->register( 'Cache', 'WP_Feed_Cache', true );
 
-	$feed->set_cache_class( 'WP_Feed_Cache' );
-	$feed->set_file_class( 'WP_SimplePie_File' );
+	$feed->set_cache_duration( $lifetime );
+	$feed->set_cache_location( 'wordpress://wordpress?lifetime=' . $lifetime );
+	$feed->set_feed_url( $url );
 
-	$feed->set_feed_url( $url );
-	/** This filter is documented in wp-includes/class-wp-feed-cache-transient.php */
-	$feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );
 	/**
 	 * Fires just before processing the SimplePie feed object.
 	 *
