Follow-on for the non-UBN part of {T370219}.
== Table information ==
Added in 628631: Add persistent translate cache | https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/628631 to meet the needs of {T182433}
Why? To keep track of the message groups and messages currently being processed, we needed a persistent cache. For this we looked at existing caching solutions provided by MediaWiki (specifically ObjectCache::getInstance(CACHE_DB)), but these could not be used as they were not persistent.
This was something that is needed only on translatewiki.net, and hence this table wasn't created on Wikimedia wikis.
We're now also storing translation state for pages that translators wish to mark for translation. See: {T360409}
This is a fairly generic table, and in the future, we might store more information in this table as needed.
=== Table structure
```
CREATE TABLE /*_*/translate_cache (
tc_key VARBINARY(255) NOT NULL,
tc_value MEDIUMBLOB DEFAULT NULL,
tc_exptime VARBINARY(14) DEFAULT NULL,
tc_tag VARBINARY(255) DEFAULT NULL,
INDEX tc_tag (tc_tag),
PRIMARY KEY(tc_key)
) /*$wgDBTableOptions*/;
```
=== More information
// **Should this table be replicated to wiki replicas (does it not contain private data)?** //
Yes, we need to create the table on all the wikis where the Translate extension is enabled. It contains information about the translation state of pages: whether they should be marked for translation or not.
It does not contain private data //currently//.
// **Will you be doing cross-joins with the wiki metadata?** //
Currently we're not doing any joins with wiki metadata, and I don't foresee doing so in the future either.
// **Size of the table (number of rows expected).** //
TODO
// **Expected growth per year (number of rows).**//
TODO
// **Expected amount of queries, both writes and reads (per minute, per hour...per day, any of those are ok)** //
TODO
// **Examples of queries that will be using the table** //
```
lang=sql
```
See https://wikitech.wikimedia.org/wiki/Creating_new_tables for more.