resourceloader: Remove use of msg_resource_links table
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 6 Nov 2015 23:20:16 +0000 (23:20 +0000)
committerKrinkle <krinklemail@gmail.com>
Mon, 9 Nov 2015 19:16:38 +0000 (19:16 +0000)
commit70f8a31afef2ad3874b82f4f5c920b55a143a231
tree8df02822097ec356fd5207b025fd953779ee8846
parentcfdf523008736d6ec9b8a7b512ea7f204ac54afb
resourceloader: Remove use of msg_resource_links table

This table is not needed because module names and their messages
array are available to the runtime environment at very little cost.

The only purpose it was serving is reverse lookup from message
key to module name (e.g. when MessageCache receives update that
need to propagate to MessageBlobStore). However that is better
achieved by simply looping through modules in PHP. The overhead
of a database is not worth this minor convenience.

MessageBlobStore
* insertMessageBlob: Doesn't need to update msg_resource_links.
* updateModule: Doesn't need to update msg_resource_links.
* getUpdatesForMessage: Reimplement with list from memory
  instead of msg_resource_links.

The database table will be removed in If009e2620e59002e1.

Bug: T113092
Change-Id: Ia9131f570001f00c9800b260ac4b3469d54d2784
includes/cache/MessageBlobStore.php
includes/cache/MessageCache.php
includes/resourceloader/ResourceLoader.php
maintenance/cleanupRemovedModules.php