TermFallbackCacheFacade is class to allow for simplified interaction with the shared cache used for storing TermFallback objects (also known as the term fallback cache or formatter cache).
More...
|
| __construct (CacheInterface $cache, int $cacheTtlInSeconds) |
|
| get (EntityId $targetEntityId, int $revisionId, string $languageCode, string $termType) |
|
| set (?TermFallback $termFallback, EntityId $targetEntityId, int $revisionId, string $languageCode, string $termType) |
|
TermFallbackCacheFacade is class to allow for simplified interaction with the shared cache used for storing TermFallback objects (also known as the term fallback cache or formatter cache).
The cache returns TermFallbackCacheFacade::NO_VALUE in the case there is no entry in the cache.
Storing null values is also allowed as this indicates we have already checked the database for the term but found nothing.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Lib\TermFallbackCache\TermFallbackCacheFacade::__construct |
( |
CacheInterface |
$cache, |
|
|
int |
$cacheTtlInSeconds |
|
) |
| |
◆ get()
Wikibase\Lib\TermFallbackCache\TermFallbackCacheFacade::get |
( |
EntityId |
$targetEntityId, |
|
|
int |
$revisionId, |
|
|
string |
$languageCode, |
|
|
string |
$termType |
|
) |
| |
- Parameters
-
EntityId | $targetEntityId | |
int | $revisionId | |
string | $languageCode | |
string | $termType | |
- Returns
- false|TermFallback|null
- returning null indicates we have already checked the database and stored it's null response in the cache.
- returning false indicates there is no cache entry.
◆ set()
Wikibase\Lib\TermFallbackCache\TermFallbackCacheFacade::set |
( |
?TermFallback |
$termFallback, |
|
|
EntityId |
$targetEntityId, |
|
|
int |
$revisionId, |
|
|
string |
$languageCode, |
|
|
string |
$termType |
|
) |
| |
- Parameters
-
null | TermFallback | $termFallback | |
EntityId | $targetEntityId | |
int | $revisionId | |
string | $languageCode | |
string | $termType | |
◆ $cache
Wikibase\Lib\TermFallbackCache\TermFallbackCacheFacade::$cache |
|
private |
◆ $cacheTtlInSeconds
Wikibase\Lib\TermFallbackCache\TermFallbackCacheFacade::$cacheTtlInSeconds |
|
private |
◆ NO_VALUE
const Wikibase\Lib\TermFallbackCache\TermFallbackCacheFacade::NO_VALUE = false |
The documentation for this class was generated from the following file: