SimplePie_Cache_Memcached::__construct() – Create a new cache object
You appear to be a bot. Output may be restricted
Description
Create a new cache object
Usage
SimplePie_Cache_Memcached::__construct( $location, $name, $type );
Parameters
- $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
Returns
void
Source
File name: wordpress/wp-includes/SimplePie/Cache/Memcached.php
Lines:
1 to 17 of 17
public function __construct($location, $name, $type) { $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 Memcached(); $this->cache->addServer($this->options['host'], (int)$this->options['port']); }