SimplePie 1.3.1 is now available. Upgrade now!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » set_autodiscovery_cache_duration()

set_autodiscovery_cache_duration()

Description

class SimplePie {
	set_autodiscovery_cache_duration ( [int $seconds = 604800] )
}

Set the maximum time (in seconds) for which an autodiscovered feed URL will be cached.

Works with autodiscovery along with set_autodiscovery_level() and set_max_checked_feeds().

Availability

  • Available since SimplePie 1.0.

Parameters

seconds

The number of seconds to cache for. Defaults to one week.

Examples

Change the autodiscovery cache duration (not recommended)

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->set_autodiscovery_cache_duration(1209600); // 2 weeks
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


reference/simplepie/set_autodiscovery_cache_duration.txt · Last modified: 2011/03/05 19:56 (external edit)