wp_feed_cache_transient_lifetime

wp_feed_cache_transient_lifetime

Hook Type: filter
See hook in action
See hook in
Displaying hooks found in version: wordpress-5.2.2

apply_filters('wp_feed_cache_transient_lifetime') is found 2 times:

  • /wp-includes/class-wp-feed-cache-transient.php line 66
    		 *
    		 * @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 );
    	}
    
    	/**
    	 * Sets the transient.
    	 *
    	 * @since 2.8.0
    
  • /wp-includes/feed.php line 754
    	$feed->set_file_class( 'WP_SimplePie_File' );
    
    	$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.
    	 *
    	 * @since 3.0.0
    	 *
    	 * @param object $feed SimplePie feed object (passed by reference).
    

See this hook used in plugins: