Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r20489: LJSUP-10313 (make in-process caches of u...

Committer: ailyin
LJSUP-10313 (make in-process caches of userprops more reliable)
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2011-11-07 13:05:49 UTC (rev 20488)
+++ trunk/cgi-bin/LJ/User.pm	2011-11-07 14:30:50 UTC (rev 20489)
@@ -1452,7 +1452,7 @@
 
 sub raw_prop {
     my ($u, $prop) = @_;
-    $u->preload_props($prop) unless exists $u->{$prop};
+    $u->preload_props($prop);
     return $u->{$prop};
 }
 
@@ -6464,6 +6464,9 @@
         }
     };
 
+    @props = grep { ! exists $u->{$_} } @props;
+    return unless @props;
+
     my $groups = LJ::User::PropStorage->get_handler_multi(\@props);
     my $memcache_available = @LJ::MEMCACHE_SERVERS;
     my $use_master = $memcache_available || $opts->{'use_master'};

Tags: ailyin, andy, livejournal, pm
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