Summery Summery
Create a new cache object
Syntax Syntax
Parameters Parameters
- $location
-
(Required) Location string (from SimplePie::$cache_location)
- $name
-
(Required) Unique ID for the cache
- $type
-
(Required) Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
Source Source
File: wp-includes/SimplePie/Cache/Memcache.php
{
$this->options = array(
'host' => '127.0.0.1',
'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']);
}
/**
* Save data to the cache