\SimplePie_Cache_MySQL
Caches data to a MySQL database
Registered for URLs with the "mysql" protocol
For example, `mysql://root:password@localhost:3306/mydb?prefix=sp_` will
connect to the `mydb` database on `localhost` on port 3306, with the user
`root` and the password `password`. All tables will be prefixed with `sp_`
Synopsis
class SimplePie_Cache_MySQL
extends SimplePie_Cache_DB
{
- // methods
- public void __construct()
- public bool save()
- public array load()
- public int mtime()
- public bool touch()
- public bool unlink()
- // Inherited methods from SimplePie_Cache_DB
- protected static array prepare_simplepie_object_for_cache()
Hierarchy
Extends
Constants
Name | Value |
---|---|
TYPE_FEED | 'spc' |
TYPE_IMAGE | 'spi' |
Members
protected
- $id
—
string
Cache ID - $mysql
—
PDO
PDO instance - $options
—
array
Options
Methods
public
- __construct() — Create a new cache object
- load() — Retrieve the data saved to the cache
- mtime() — Retrieve the last modified time for the cache
- save() — Save data to the cache
- touch() — Set the last modified time to the current time
- unlink() — Remove the cache
Inherited from SimplePie_Cache_DB
protected
- prepare_simplepie_object_for_cache() — Helper for database conversion