ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
CallbackTranslationCache.php
Go to the documentation of this file.
1<?php
2
20declare(strict_types=1);
21
23
27final readonly class CallbackTranslationCache implements TranslationCache
28{
29 public function __construct(
30 private \Closure $invalidate
31 ) {
32 }
33
34 public function invalidate(string $lang_key): void
35 {
36 ($this->invalidate)($lang_key);
37 }
38}
Lets a test observe or influence the invalidation.
__construct(private \Closure $invalidate)
Cache of the translations of a language, which must be invalidated whenever lng_modules changes.