WordPress at a glance
function is not described

SimplePie_Cache_Memcache::__construct() public WP 1.0

Create a new cache object

{} It's a method of the class: SimplePie_Cache_Memcache{}

No Hooks.


null. Nothing.


$SimplePie_Cache_Memcache = new SimplePie_Cache_Memcache();
$SimplePie_Cache_Memcache->__construct( $location, $name, $type );
$location(string) (required)
Location string (from SimplePie::$cache_location)
$name(string) (required)
Unique ID for the cache
$type(string) (required)
Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data

Code of SimplePie_Cache_Memcache::__construct() WP 5.7.2

public function __construct($location, $name, $type)
	$this->options = array(
		'host' => '',
		'port' => 11211,
		'extras' => array(
			'timeout' => 3600, // one hour
			'prefix' => 'simplepie_',
	$this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));

	$this->name = $this->options['extras']['prefix'] . md5("$name:$type");

	$this->cache = new Memcache();
	$this->cache->addServer($this->options['host'], (int) $this->options['port']);