![]() |
TYPO3
7.6
|
Public Member Functions | |
setDataSourceName ($DSN) | |
setUsername ($username) | |
setPassword ($password) | |
initializeObject () | |
set ($entryIdentifier, $data, array $tags=array(), $lifetime=null) | |
get ($entryIdentifier) | |
has ($entryIdentifier) | |
remove ($entryIdentifier) | |
flush () | |
flushByTag ($tag) | |
findIdentifiersByTag ($tag) | |
collectGarbage () | |
![]() | |
__construct ($context, array $options=array()) | |
setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) | |
setDefaultLifetime ($defaultLifetime) | |
Protected Member Functions | |
getNotExpiredStatement () | |
connect () | |
createCacheTables () | |
![]() | |
calculateExpiryTime ($lifetime=null) | |
Protected Attributes | |
$dataSourceName | |
$username | |
$password | |
$databaseHandle | |
$pdoDriver | |
![]() | |
$cache | |
$cacheIdentifier | |
$context | |
$defaultLifetime = 3600 | |
Additional Inherited Members | |
![]() | |
const | DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000' |
const | UNLIMITED_LIFETIME = 0 |
A PDO database cache backend
Definition at line 21 of file PdoBackend.php.
collectGarbage | ( | ) |
Does garbage collection
Implements BackendInterface.
Definition at line 227 of file PdoBackend.php.
References $GLOBALS.
|
protected |
Connect to the database
\RuntimeException | if something goes wrong |
Definition at line 251 of file PdoBackend.php.
References PdoBackend\createCacheTables().
Referenced by PdoBackend\initializeObject().
|
protected |
Creates the tables needed for the cache backend.
\RuntimeException | if something goes wrong |
Definition at line 277 of file PdoBackend.php.
Referenced by PdoBackend\connect().
findIdentifiersByTag | ( | $tag | ) |
Finds and returns all cache entry identifiers which are tagged by the specified tag.
string | $tag | The tag to search for |
Implements TaggableBackendInterface.
Definition at line 214 of file PdoBackend.php.
flush | ( | ) |
Removes all cache entries of this cache.
Implements BackendInterface.
Definition at line 183 of file PdoBackend.php.
flushByTag | ( | $tag | ) |
Removes all cache entries of this cache which are tagged by the specified tag.
string | $tag | The tag the entries must have |
Implements TaggableBackendInterface.
Definition at line 198 of file PdoBackend.php.
get | ( | $entryIdentifier | ) |
Loads data from the cache.
string | $entryIdentifier | An identifier which describes the cache entry to load |
Implements BackendInterface.
Definition at line 138 of file PdoBackend.php.
References PdoBackend\getNotExpiredStatement().
|
protected |
Returns an SQL statement that evaluates to TRUE if the entry is not expired.
Definition at line 240 of file PdoBackend.php.
References $GLOBALS.
Referenced by PdoBackend\get(), and PdoBackend\has().
has | ( | $entryIdentifier | ) |
Checks if a cache entry with the specified identifier exists.
string | $entryIdentifier | An identifier specifying the cache entry |
Implements BackendInterface.
Definition at line 152 of file PdoBackend.php.
References PdoBackend\getNotExpiredStatement().
initializeObject | ( | ) |
Initialize the cache backend.
Definition at line 89 of file PdoBackend.php.
References PdoBackend\connect().
remove | ( | $entryIdentifier | ) |
Removes all cache entries matching the specified identifier. Usually this only affects one entry but if - for what reason ever - old entries for the identifier still exist, they are removed as well.
string | $entryIdentifier | Specifies the cache entry to remove |
Implements BackendInterface.
Definition at line 168 of file PdoBackend.php.
set | ( | $entryIdentifier, | |
$data, | |||
array | $tags = array() , |
||
$lifetime = null |
|||
) |
Saves data in the cache.
string | $entryIdentifier | An identifier for this specific cache entry |
string | $data | The data to be stored |
array | $tags | Tags to associate with this cache entry |
int | $lifetime | Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime. |
\TYPO3\CMS\Core\Cache\Exception | if no cache frontend has been set. |
\InvalidArgumentException | if the identifier is not valid |
\TYPO3\CMS\Core\Cache\Exception\InvalidDataException | if $data is not a string |
Implements BackendInterface.
Definition at line 107 of file PdoBackend.php.
References $GLOBALS.
setDataSourceName | ( | $DSN | ) |
Sets the DSN to use
string | $DSN | The DSN to use for connecting to the DB |
Definition at line 55 of file PdoBackend.php.
setPassword | ( | $password | ) |
Sets the password to use
string | $password | The password to use for connecting to the DB |
Definition at line 79 of file PdoBackend.php.
References PdoBackend\$password.
setUsername | ( | $username | ) |
Sets the username to use
string | $username | The username to use for connecting to the DB |
Definition at line 67 of file PdoBackend.php.
References PdoBackend\$username.
|
protected |
Definition at line 41 of file PdoBackend.php.
|
protected |
Definition at line 26 of file PdoBackend.php.
|
protected |
Definition at line 36 of file PdoBackend.php.
Referenced by PdoBackend\setPassword().
|
protected |
Definition at line 46 of file PdoBackend.php.
|
protected |
Definition at line 31 of file PdoBackend.php.
Referenced by PdoBackend\setUsername().