23 private ?array $index =
null;
24 private const FILENAME =
'translate_messageindex.ser';
26 public function retrieve(
bool $readLatest =
false ): array {
27 if ( $this->index !==
null ) {
31 $file = Utilities::cacheFile( self::FILENAME );
32 if ( file_exists( $file ) ) {
33 $this->index = unserialize( file_get_contents( $file ) );
41 public function store( array $array, array $diff ):
void {
42 $file = Utilities::cacheFile( self::FILENAME );
43 file_put_contents( $file,
serialize( $array ) );
44 $this->index = $array;