madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[ljcom] r12467: LJSUP-13301: Main page optimization

Committer: sbelyaev
LJSUP-13301: Main page optimization
U   trunk/cgi-bin/LJ/Widget/UpdatesForUser.pm
Modified: trunk/cgi-bin/LJ/Widget/UpdatesForUser.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/UpdatesForUser.pm	2012-08-15 11:22:00 UTC (rev 12466)
+++ trunk/cgi-bin/LJ/Widget/UpdatesForUser.pm	2012-08-15 11:29:01 UTC (rev 12467)
@@ -19,6 +19,12 @@
 
     my $remote = LJ::get_remote();
 
+    my $cached_key = "update_for_users:" . $remote->userid;
+    my $cache_data = LJ::MemCache::get($cached_key);
+    if ($cache_data) {
+        return $cache_data;
+    }
+
     my $ret;
     $ret .= "<div class='w-head'><h2><span class='w-head-in'>" . $class->ml('widget.updatesforuser.title', { ljuser => $remote->ljuser_display } ) . "</span></h2> <i class='w-head-corner'></i></div>";
     

Tags: ljcom, 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