Base for cache objects.
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.
|
| |
Base for cache objects.
Classes to be used with {
- See also
- SimplePie::Cache::register()} are expected to implement this interface.
@subpackage Caching
- Deprecated
- since SimplePie 1.8.0, use "Psr::SimpleCache::CacheInterface" instead
◆ __construct()
| Base::__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 |
Implemented in File, Memcache, Memcached, MySQL, and Redis.
◆ load()
◆ mtime()
◆ 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
-
Implemented in File, Memcache, Memcached, MySQL, and Redis.
◆ touch()
◆ unlink()
The documentation for this interface was generated from the following file:
- lib/simplepie/src/Cache/Base.php