summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/l10n_client.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-02-21 23:50:01 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-02-21 23:50:01 -0800
commit334cd2368de24a76cd49681a14295350e85714d0 (patch)
treefb29d1c7749c5ba1b7658ecf0c47f0e14d1be3d7 /modules/gallery/controllers/l10n_client.php
parent6591ea25771f2ab31fea4bf3b7a6fd76c586e098 (diff)
Performance improvement: Load all translations of a locale as one serialized array from the Cache.
Until now, we loaded hundreds of translation messages row by row, and unserializing one by one at bootstrap time. That amounted to a significant percentage of the complete request time. This approach is more than 10x faster.
Diffstat (limited to 'modules/gallery/controllers/l10n_client.php')
-rw-r--r--modules/gallery/controllers/l10n_client.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gallery/controllers/l10n_client.php b/modules/gallery/controllers/l10n_client.php
index e20bab50..be0aaa11 100644
--- a/modules/gallery/controllers/l10n_client.php
+++ b/modules/gallery/controllers/l10n_client.php
@@ -80,6 +80,8 @@ class L10n_Client_Controller extends Controller {
$entry->save();
+ Gallery_I18n::clear_cache($locale);
+
print json_encode(new stdClass());
}