Creates a new (transient) cache object.
$locationstringrequired
$namestringrequired
$typeBase::TYPE_FEED|Base::TYPE_IMAGErequired
TYPE_FEED ('spc') for SimplePie data, or TYPE_IMAGE ('spi') for image data.public function __construct( $location, $name, $type ) {
$this->name = 'feed_' . $name;
$this->mod_name = 'feed_mod_' . $name;
$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 $name Unique identifier for the cache object.
*/
$this->lifetime = apply_filters( 'wp_feed_cache_transient_lifetime', $lifetime, $name );
}
Filters the transient lifetime of the feed cache.
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_feed_cache_transient/__construct