diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-30 08:46:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-30 08:46:17 +0000 |
commit | 8fdf7a87503c9572fa481e4edc2f913a1385eb48 (patch) | |
tree | c25c1206468d5868763a91825ce2505284c9198b /modules/locale/locale.module | |
parent | da47651fb6671965efb459513e986cd5bac8b5fd (diff) | |
download | brdo-8fdf7a87503c9572fa481e4edc2f913a1385eb48.tar.gz brdo-8fdf7a87503c9572fa481e4edc2f913a1385eb48.tar.bz2 |
- Patch #72290 by killes: split up the cache table.
Diffstat (limited to 'modules/locale/locale.module')
-rw-r--r-- | modules/locale/locale.module | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 555e4cafc..abe3db056 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -181,11 +181,11 @@ function locale($string) { // Store database cached translations in a static var. if (!isset($locale_t)) { - $cache = cache_get("locale:$locale"); + $cache = cache_get("locale:$locale", 'cache'); if (!$cache) { locale_refresh_cache(); - $cache = cache_get("locale:$locale"); + $cache = cache_get("locale:$locale", 'cache'); } $locale_t = unserialize($cache->data); } @@ -225,7 +225,7 @@ function locale($string) { } } // Clear locale cache in DB - cache_clear_all("locale:$locale"); + cache_clear_all("locale:$locale", 'cache'); } } @@ -246,7 +246,7 @@ function locale_refresh_cache() { while ($data = db_fetch_object($result)) { $t[$data->source] = (empty($data->translation) ? TRUE : $data->translation); } - cache_set("locale:$locale", serialize($t)); + cache_set("locale:$locale", 'cache', serialize($t)); } } @@ -357,7 +357,8 @@ function locale_admin_manage_delete_form_submit($form_id, $form_values) { } // Changing the locale settings impacts the interface: - cache_clear_all(); + cache_clear_all('*', 'cache_menu', TRUE); + cache_clear_all('*', 'cache_page', TRUE); return 'admin/settings/locale/language/overview'; } |