madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22906: LJSUP-13673: memcached usage optimizatio...

Committer: sbelyaev
LJSUP-13673: memcached usage optimization for language variables
U   trunk/cgi-bin/LJ/Lang.pm
Modified: trunk/cgi-bin/LJ/Lang.pm
===================================================================
--- trunk/cgi-bin/LJ/Lang.pm	2012-09-17 12:13:03 UTC (rev 22905)
+++ trunk/cgi-bin/LJ/Lang.pm	2012-09-17 12:17:03 UTC (rev 22906)
@@ -724,7 +724,10 @@
     ## %memkeys: lower-case code --> memcache key
     my %memkeys;
     foreach my $code ( keys %lc_codes ) {
-        my $cache_key = "ml.${lang}.${dmid}.${code}";
+        my @code_array = split //, $code;
+        my $cache_key = $code_array[1] eq '.' ? "ml.${lang}.${dmid}.${code}"
+                                              : "ml.${lang}.${dmid}${code}";
+
         my $text      = undef;
         $text = $TXT_CACHE{$cache_key} unless $LJ::NO_ML_CACHE;
 

Tags: livejournal, madeon, pm, sbelyaev
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments