‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture:
TYPO3\CMS\Core\Cache\Backend\BackendInterface TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendConfigurationOptionFixture TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendDefaultFixture TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendInitializeObjectFixture

Public Member Functions

 setCache (FrontendInterface $cache)
 
 set ($entryIdentifier, $data, array $tags=[], $lifetime=null)
 
 get ($entryIdentifier)
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 collectGarbage ()
 

Detailed Description

Definition at line 23 of file BackendFixture.php.

Member Function Documentation

◆ collectGarbage()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::collectGarbage ( )

Does garbage collection

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 43 of file BackendFixture.php.

◆ flush()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::flush ( )

Removes all cache entries of this cache.

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 41 of file BackendFixture.php.

◆ get()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::get (   $entryIdentifier)

Loads data from the cache.

Parameters
string$entryIdentifier‪An identifier which describes the cache entry to load
Returns
‪mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 29 of file BackendFixture.php.

◆ has()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::has (   $entryIdentifier)

Checks if a cache entry with the specified identifier exists.

Parameters
string$entryIdentifier‪An identifier specifying the cache entry
Returns
‪bool TRUE if such an entry exists, FALSE if not

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 31 of file BackendFixture.php.

◆ remove()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::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.

Parameters
string$entryIdentifier‪Specifies the cache entry to remove
Returns
‪bool TRUE if (at least) an entry could be removed or FALSE if no entry was found

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 36 of file BackendFixture.php.

◆ set()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::set (   $entryIdentifier,
  $data,
array  $tags = [],
  $lifetime = null 
)

Saves data in the cache.

Parameters
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. If the backend does not support tags, this option can be ignored.
int$lifetime‪Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
Exceptions

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 27 of file BackendFixture.php.

◆ setCache()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\BackendFixture::setCache ( FrontendInterface  $cache)

Sets a reference to the cache frontend which uses this backend

Parameters
Cache\Frontend\FrontendInterface$cache‪The frontend for this backend

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 25 of file BackendFixture.php.