PHP Класс DmitryDulepov\Realurl\Cache\DatabaseCache

Наследование: implements DmitryDulepov\Realurl\Cache\CacheInterface, implements TYPO3\CMS\Core\SingletonInterface
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$maximumNumberOfRecords integer

Защищенные свойства (Protected)

Свойство Тип Описание
$databaseConnection TYPO3\CMS\Core\Database\DatabaseConnection

Открытые методы

Метод Описание
__construct ( ) Initializes the class.
clearExpiredCacheEntries ( ) : void Removes expired path cache entries.
clearPathCacheForPage ( integer $pageId ) : void Empties the path cache for one page.
clearUrlCache ( ) : mixed Empties the URL cache.
clearUrlCacheById ( string $cacheId ) : void Clears URL cache by cache id.
clearUrlCacheForPage ( integer $pageId ) : void Empties the URL cache for one page.
expireCache ( integer $pageId, integer | null $languageId = null ) : void Expires cache for the given page and language.
getPathFromCacheByPageId ( integer $rootPageId, integer $languageId, integer $pageId, string $mpVar ) : DmitryDulepov\Realurl\Cache\PathCacheEntry | null Obtains non-expired (!) path from the path cache.
getPathFromCacheByPagePath ( integer $rootPageId, integer $languageId, string | null $mountPoint, string $pagePath ) : DmitryDulepov\Realurl\Cache\PathCacheEntry | null Obtains path from the path cache.
getUrlFromCacheByOriginalUrl ( integer $rootPageId, string $originalUrl ) : DmitryDulepov\Realurl\Cache\UrlCacheEntry | null Gets the entry from cache.
getUrlFromCacheBySpeakingUrl ( integer $rootPageId, string $speakingUrl, integer | null $languageId ) : DmitryDulepov\Realurl\Cache\UrlCacheEntry | null Gets the entry from cache. Language id is needed here because in some cases URLs can be the same for different languages (_DOMAINS & use alias, for example).
putPathToCache ( DmitryDulepov\Realurl\Cache\PathCacheEntry $cacheEntry ) : void Puts path to the cache.
putUrlToCache ( DmitryDulepov\Realurl\Cache\UrlCacheEntry $cacheEntry ) : void Sets the entry to cache.

Защищенные методы

Метод Описание
limitTableRecords ( string $tableName ) : boolean Limits amount of records in the table. This does not run often.

Описание методов

__construct() публичный Метод

Initializes the class.
public __construct ( )

clearExpiredCacheEntries() публичный Метод

Removes expired path cache entries.
public clearExpiredCacheEntries ( ) : void
Результат void

clearPathCacheForPage() публичный Метод

Empties the path cache for one page.
public clearPathCacheForPage ( integer $pageId ) : void
$pageId integer
Результат void

clearUrlCache() публичный Метод

Empties the URL cache.
public clearUrlCache ( ) : mixed
Результат mixed

clearUrlCacheById() публичный Метод

Clears URL cache by cache id.
public clearUrlCacheById ( string $cacheId ) : void
$cacheId string
Результат void

clearUrlCacheForPage() публичный Метод

Empties the URL cache for one page.
public clearUrlCacheForPage ( integer $pageId ) : void
$pageId integer
Результат void

expireCache() публичный Метод

Expires cache for the given page and language.
public expireCache ( integer $pageId, integer | null $languageId = null ) : void
$pageId integer
$languageId integer | null
Результат void

getPathFromCacheByPageId() публичный Метод

Obtains non-expired (!) path from the path cache.
public getPathFromCacheByPageId ( integer $rootPageId, integer $languageId, integer $pageId, string $mpVar ) : DmitryDulepov\Realurl\Cache\PathCacheEntry | null
$rootPageId integer
$languageId integer
$pageId integer
$mpVar string
Результат DmitryDulepov\Realurl\Cache\PathCacheEntry | null

getPathFromCacheByPagePath() публичный Метод

Obtains path from the path cache.
public getPathFromCacheByPagePath ( integer $rootPageId, integer $languageId, string | null $mountPoint, string $pagePath ) : DmitryDulepov\Realurl\Cache\PathCacheEntry | null
$rootPageId integer
$languageId integer
$mountPoint string | null null means exclude from search
$pagePath string
Результат DmitryDulepov\Realurl\Cache\PathCacheEntry | null

getUrlFromCacheByOriginalUrl() публичный Метод

Gets the entry from cache.
public getUrlFromCacheByOriginalUrl ( integer $rootPageId, string $originalUrl ) : DmitryDulepov\Realurl\Cache\UrlCacheEntry | null
$rootPageId integer
$originalUrl string
Результат DmitryDulepov\Realurl\Cache\UrlCacheEntry | null

getUrlFromCacheBySpeakingUrl() публичный Метод

We may not fallback to the default language here!
public getUrlFromCacheBySpeakingUrl ( integer $rootPageId, string $speakingUrl, integer | null $languageId ) : DmitryDulepov\Realurl\Cache\UrlCacheEntry | null
$rootPageId integer
$speakingUrl string
$languageId integer | null
Результат DmitryDulepov\Realurl\Cache\UrlCacheEntry | null

limitTableRecords() защищенный Метод

Records are removed in the uid order (oldest first). This is not a true clean up, which would be based on the last access timestamp but good enough to maintain performance.
protected limitTableRecords ( string $tableName ) : boolean
$tableName string
Результат boolean

putPathToCache() публичный Метод

Puts path to the cache.
public putPathToCache ( DmitryDulepov\Realurl\Cache\PathCacheEntry $cacheEntry ) : void
$cacheEntry DmitryDulepov\Realurl\Cache\PathCacheEntry
Результат void

putUrlToCache() публичный Метод

Sets the entry to cache.
public putUrlToCache ( DmitryDulepov\Realurl\Cache\UrlCacheEntry $cacheEntry ) : void
$cacheEntry DmitryDulepov\Realurl\Cache\UrlCacheEntry
Результат void

Описание свойств

$databaseConnection защищенное свойство

protected DatabaseConnection,TYPO3\CMS\Core\Database $databaseConnection
Результат TYPO3\CMS\Core\Database\DatabaseConnection

$maximumNumberOfRecords публичное статическое свойство

public static int $maximumNumberOfRecords
Результат integer