madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r23070: LJSUP-13883: Journal pages optimizaiton ...

Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1
U   trunk/cgi-bin/LJ/S2.pm
Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2012-10-09 08:40:16 UTC (rev 23069)
+++ trunk/cgi-bin/LJ/S2.pm	2012-10-09 10:08:21 UTC (rev 23070)
@@ -3890,7 +3890,19 @@
         $params->{link_color} = $link_color->{as_string};
     }
 
-    return LJ::ljuser($UserLite->{_u}, $params );
+    my $u = $UserLite->{_u};
+    my $key .= 'c:';
+       $key .= 'sa:' .  $params->{side_alias} if $params->{side_alias};
+       $key .= ':ij:' . $params->{in_journal} if $params->{in_journal};
+       $key .= ':lc:' . $params->{link_color} if $params->{link_color};
+
+    my $ljuser = $u->{'_cache_ljuser'}->{$key};
+    if (!$ljuser) {
+        my $ljuser = LJ::ljuser($u, $params );
+        $u->{'_cache_ljuser'}->{$key} = $ljuser;
+    }
+
+    return $ljuser;
 }
 
 sub UserLite__get_link

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