The MediaWiki default is to store localisation cache in the database.
At WMF production, it's been the case for many years that these are stored as a file on disk instead, in a private cache directory. MediaWiki offers two well-tested formats for this: php array files, and CDB files. CDB files is what WMF currently uses in production. PHP-array files is what we're moving toward (T99740), which are even faster to generate and faster(but difficult to read than CDB filesmanage opcache memory for, T99740).
For third parties, this means:
* More performant by default. We'd no longer require db-master connections on web requests when repopulating the localisation cache.
* Better recache performance.
#### Benchmark
>>! From T218207#5138303
>In T218207#5138303, @Krinkle wrote:>
> | Test case / LCStore | A (database table, current MW default) | B (CDB files, current WMF)
> | Test case / LCStore | Database table (current MW default) | Static array files (proposed)
> | |--|--|--
> | 1 (Populate 1 language) | 3.782s, 4.000s, 3.981s | 3.118s, 3.161s, 3.041s {icon arrow-circle-o-down color=green}
> |--
> | 2 (Populate all languages) | 1m51s, 1m47s, 1m33s | 1m13s, 1m13s, 1m10s {icon arrow-circle-o-down color=green}
> |--
> | 3 (Page load time) | 2013 ms, 2049 ms, 2049 ms | 1771 ms853 ms, 1628 ms1907 ms, 1801869 ms {icon arrow-circle-o-down color=green}
> |--
This seems like a fairly easy thing to enable by default. Should we do that? Are there reasons we haven't already?
#### Sub tasks
* {icon check-square-o} Benchmark the different static file formats (php vs cdb). – T218207#5138303.
* {icon square-o} Decide where to store them on disk. Some options discussed at T218207#5160934.