madeon (madeon) wrote in changelog,
madeon
madeon
changelog

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

Committer: sbelyaev
LJSUP-13883: Journal pages optimizaiton : stage 1
U   trunk/cgi-bin/LJ/S2/RecentPage.pm
U   trunk/cgi-bin/ljuserpics.pl
Modified: trunk/cgi-bin/LJ/S2/RecentPage.pm
===================================================================
--- trunk/cgi-bin/LJ/S2/RecentPage.pm	2012-10-10 12:22:37 UTC (rev 23090)
+++ trunk/cgi-bin/LJ/S2/RecentPage.pm	2012-10-10 13:12:32 UTC (rev 23091)
@@ -138,6 +138,8 @@
         $apu{$_->{'posterid'}} = undef;
     }
     if (%apu) {
+        LJ::MemCacheProxy::get_multi( map { $_, "upicinf:$_" } keys %apu );
+        LJ::MemCacheProxy::get_multi( map { $_, "upiccom:$_" } keys %apu );
         LJ::load_userids_multiple([map { $_, \$apu{$_} } keys %apu], [$u]);
         $apu_lite{$_} = UserLite($apu{$_}) foreach keys %apu;
     }

Modified: trunk/cgi-bin/ljuserpics.pl
===================================================================
--- trunk/cgi-bin/ljuserpics.pl	2012-10-10 12:22:37 UTC (rev 23090)
+++ trunk/cgi-bin/ljuserpics.pl	2012-10-10 13:12:32 UTC (rev 23091)
@@ -340,14 +340,14 @@
     my $memkey = [$u->{'userid'},"upicinf:$u->{'userid'}"];
     my ($info, $minfo);
 
-    if ($minfo = LJ::MemCache::get($memkey)) {
+    if ($minfo = LJ::MemCacheProxy::get($memkey)) {
         # the pre-versioned memcache data was a two-element hash.
         # since then, we use an array and include a version number.
 
         if (ref $minfo eq 'HASH' ||
             $minfo->[0] != $VERSION_PICINFO) {
             # old data in the cache.  delete.
-            LJ::MemCache::delete($memkey);
+            LJ::MemCacheProxy::delete($memkey);
         } else {
             my (undef, $picstr, $kwstr) = @$minfo;
             $info = {
@@ -377,7 +377,7 @@
             # Load picture comments
             if ($opts->{'load_comments'}) {
                 my $commemkey = [$u->{'userid'}, "upiccom:$u->{'userid'}"];
-                my $comminfo = LJ::MemCache::get($commemkey);
+                my $comminfo = LJ::MemCacheProxy::get($commemkey);
 
                 if (defined $comminfo) {
                     my ($pos, $nulpos);

Tags: livejournal, madeon, pl, 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