PHP 클래스 DmitryDulepov\Realurl\Cache\DatabaseCache

상속: implements DmitryDulepov\Realurl\Cache\CacheInterface, implements TYPO3\CMS\Core\SingletonInterface
파일 보기 프로젝트 열기: dmitryd/typo3-realurl

공개 프로퍼티들

프로퍼티 타입 설명
$maximumNumberOfRecords integer

보호된 프로퍼티들

프로퍼티 타입 설명
$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