WP_Feed_Cache_Transient::__construct( string $location, string $name, Base::TYPE_FEED|Base::TYPE_IMAGE $type )

Creates a new (transient) cache object.


Parameters

$location

(Required) URL location (scheme is used to determine handler).

$name

(Required) Unique identifier for cache object.

$type

(Required) Either TYPE_FEED ('spc') for SimplePie data, or TYPE_IMAGE ('spi') for image data.


Source

File: wp-includes/class-wp-feed-cache-transient.php

	public function __construct($location, $filename, $extension) {
		$this->name = 'feed_' . $filename;
		$this->mod_name = 'feed_mod_' . $filename;

		$lifetime = $this->lifetime;
		/**
		 * Filters the transient lifetime of the feed cache.
		 *
		 * @since WP-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);
	}

Changelog

Changelog
Version Description
6.7.0 Parameter names have been updated to be in line with the SimplePieCacheBase interface.
3.2.0 Updated to use a PHP5 constructor.
2.8.0 Introduced.