TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Cache\Frontend\PhpFrontend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Frontend\PhpFrontend:
TYPO3\CMS\Core\Cache\Frontend\StringFrontend TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend TYPO3\CMS\Core\Cache\Frontend\FrontendInterface t3lib_cache_frontend_PhpFrontend

Public Member Functions

 __construct ($identifier, \TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface $backend)
 
 set ($entryIdentifier, $sourceCode, array $tags=array(), $lifetime=NULL)
 
 requireOnce ($entryIdentifier)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Cache\Frontend\StringFrontend
 set ($entryIdentifier, $string, array $tags=array(), $lifetime=NULL)
 
 get ($entryIdentifier)
 
 getByTag ($tag)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend
 __construct ($identifier, \TYPO3\CMS\Core\Cache\Backend\BackendInterface $backend)
 
 getIdentifier ()
 
 getBackend ()
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 flushByTag ($tag)
 
 collectGarbage ()
 
 isValidEntryIdentifier ($identifier)
 
 isValidTag ($tag)
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
const TAG_CLASS = '%CLASS%'
 
const TAG_PACKAGE = '%PACKAGE%'
 
const PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'
 
const PATTERN_TAG = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'
 
- Protected Attributes inherited from TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend
 $identifier
 
 $backend
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! A cache frontend tailored to PHP code.

This file is a backport from FLOW3

Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg

Definition at line 24 of file PhpFrontend.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::__construct (   $identifier,
\TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface  $backend 
)

Constructs the cache

Parameters
string$identifierA identifier which describes this cache
\TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface$backendBackend to be used for this cache

Definition at line 32 of file PhpFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$identifier.

Member Function Documentation

◆ requireOnce()

TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::requireOnce (   $entryIdentifier)

Loads PHP code from the cache and require_onces it right away.

Parameters
string$entryIdentifierAn identifier which describes the cache entry to load
Returns
mixed Potential return value from the include operation

Definition at line 71 of file PhpFrontend.php.

◆ set()

TYPO3\CMS\Core\Cache\Frontend\PhpFrontend::set (   $entryIdentifier,
  $sourceCode,
array  $tags = array(),
  $lifetime = NULL 
)

Saves the PHP source code in the cache.

Parameters
string$entryIdentifierAn identifier used for this cache entry, for example the class name
string$sourceCodePHP source code
array$tagsTags to associate with this cache entry
integer$lifetimeLifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Returns
void
Exceptions

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 48 of file PhpFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\isValidEntryIdentifier(), and TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\isValidTag().