Caches data to the filesystem.
More...
|
| __construct ($location, $name, $type) |
| Create a new cache object.
|
|
| __construct ($url, $timeout=10, $redirects=5, $headers=null, $useragent=null, $force_fsockopen=false, $curl_options=[]) |
|
| 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.
|
|
|
| $body |
|
| $error |
|
| $headers = [] |
|
| $method = SimplePie\SimplePie::FILE_SOURCE_NONE |
|
| $permanent_url |
|
| $redirects = 0 |
|
| $status_code = 0 |
|
| $success = true |
|
| $url |
|
| $useragent |
|
string const | TYPE_FEED = 'spc' |
| Feed cache type.
|
|
string const | TYPE_IMAGE = 'spi' |
| Image cache type.
|
|
|
string | $extension |
| File extension.
|
|
string | $filename |
| Filename.
|
|
string | $location |
| Location string.
|
|
string | $name |
| File path.
|
|
Caches data to the filesystem.
Used for fetching remote files and reading local files.
@subpackage Caching
- Deprecated
- since SimplePie 1.8.0, use implementation of "Psr::SimpleCache::CacheInterface" instead
Supports HTTP 1.0 via cURL or fsockopen, with spotty HTTP 1.1 support
This class can be overloaded with {
- See also
- SimplePie::SimplePie::set_file_class()}
@subpackage HTTP
- Todo
- Move to properly supporting RFC2616 (HTTP/1.1)
◆ __construct()
File::__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.
◆ $location
Location string.
- See also
- SimplePie::$cache_location
The documentation for this class was generated from the following files:
- lib/simplepie/src/Cache/File.php
- lib/simplepie/src/File.php