1 | <?php |
||
24 | class TermFallbackCacheFacade { |
||
25 | |||
26 | use TermFallbackSerializerTrait; |
||
27 | use TermCacheKeyBuilder; |
||
28 | |||
29 | public const NO_VALUE = false; |
||
30 | |||
31 | /** |
||
32 | * @var CacheInterface |
||
33 | */ |
||
34 | private $cache; |
||
35 | |||
36 | /** |
||
37 | * @var int |
||
38 | */ |
||
39 | private $cacheTtlInSeconds; |
||
40 | |||
41 | public function __construct( |
||
48 | |||
49 | /** |
||
50 | * @param EntityId $targetEntityId |
||
51 | * @param int $revisionId |
||
52 | * @param string $languageCode |
||
53 | * @param string $termType |
||
54 | * @return false|TermFallback|null |
||
55 | * |
||
56 | * @example returning null indicates we have already checked the database and stored it's null response in the cache. |
||
57 | * @example returning false indicates there is no cache entry. |
||
58 | */ |
||
59 | public function get( EntityId $targetEntityId, int $revisionId, string $languageCode, string $termType ) { |
||
69 | |||
70 | /** |
||
71 | * @param null|TermFallback $termFallback |
||
72 | * @param EntityId $targetEntityId |
||
73 | * @param int $revisionId |
||
74 | * @param string $languageCode |
||
75 | * @param string $termType |
||
76 | */ |
||
77 | public function set( |
||
89 | } |
||
90 |