Caches data to memcache

Registered for URLs with the "memcache" protocol

For example, memcache://localhost:11211/?timeout=3600&prefix=sp_ will connect to memcache on localhost on port 11211. All tables will be prefixed with sp_ and data will expire after 3600 seconds

package SimplePie
subpackage Caching
uses

 Methods

Create a new cache object

__construct(string $location, string $name, string $type) 
inherited_from \SimplePie_Cache_Base::__construct()

Parameters

$location

string

Location string (from SimplePie::$cache_location)

$name

string

Unique ID for the cache

$type

string

Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data

Retrieve the data saved to the cache

load() : array
inherited_from \SimplePie_Cache_Base::load()

Returns

arrayData for SimplePie::$data

Retrieve the last modified time for the cache

mtime() : integer
inherited_from \SimplePie_Cache_Base::mtime()

Returns

integerTimestamp

Save data to the cache

save(array|\SimplePie $data) : boolean
inherited_from \SimplePie_Cache_Base::save()

Parameters

$data

array\SimplePie

Data to store in the cache. If passed a SimplePie object, only cache the $data property

Returns

booleanSuccessfulness

Set the last modified time to the current time

touch() : boolean
inherited_from \SimplePie_Cache_Base::touch()

Returns

booleanSuccess status

 Properties

 

Memcache instance

$cache : \Memcache

Default

 

Cache name

$name : string

Default

 

Options

$options : array

Default