Caches data to memcached.
More...
|
| | __construct ($location, $name, $type) |
| | Create a new cache object.
|
| |
| | load () |
| | Retrieve the data saved to the cache.
|
| |
| | mtime () |
| | Retrieve the last modified time for the cache.
|
| |
| | save ($data) |
| | Save data to the cache.
|
| |
| | touch () |
| | Set the last modified time to the current time.
|
| |
| | unlink () |
| | Remove the cache.
|
| |
|
|
string const | TYPE_FEED = 'spc' |
| | Feed cache type.
|
| |
|
string const | TYPE_IMAGE = 'spi' |
| | Image cache type.
|
| |
|
|
NativeMemcached | $cache |
| | NativeMemcached instance.
|
| |
|
string | $name |
| | Cache name.
|
| |
|
array | $options |
| | Options.
|
| |
Caches data to memcached.
Registered for URLs with the "memcached" protocol
For example, memcached://localhost:11211/?timeout=3600&prefix=sp_ will connect to memcached on localhost on port 11211. All tables will be prefixed with sp_ and data will expire after 3600 seconds
@subpackage Caching
- Author
- Paul L. McNeely @uses Memcached
- Deprecated
- since SimplePie 1.8.0, use implementation of "Psr::SimpleCache::CacheInterface" instead
◆ __construct()
| Memcached::__construct |
( |
| $location, |
|
|
| $name, |
|
|
| $type ) |
Create a new cache object.
- Parameters
-
| string | $location | Location string (from SimplePie::$cache_location) |
| string | $name | Unique ID for the cache |
| Base::TYPE_FEED | Base::TYPE_IMAGE | $type | Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data |
Implements Base.
◆ load()
Retrieve the data saved to the cache.
- Return values
-
| array | Data for SimplePie::$data |
Implements Base.
◆ mtime()
Retrieve the last modified time for the cache.
- Return values
-
Implements Base.
◆ save()
Save data to the cache.
- Parameters
-
| array | SimplePie::SimplePie | $data | Data to store in the cache. If passed a SimplePie object, only cache the $data property |
- Return values
-
Implements Base.
◆ touch()
Set the last modified time to the current time.
- Return values
-
Implements Base.
◆ unlink()
Remove the cache.
- Return values
-
Implements Base.
The documentation for this class was generated from the following file:
- lib/simplepie/src/Cache/Memcached.php