vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17956: LJSUP-7646: do not cache db connection i...

Committer: vsukhanov
LJSUP-7646: do not cache db connection in LJ::User object. DBI::Role's cache is enough.
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2010-12-17 05:18:09 UTC (rev 17955)
+++ trunk/cgi-bin/LJ/User.pm	2010-12-17 06:02:31 UTC (rev 17956)
@@ -388,8 +388,7 @@
 # user is writable, else 0
 sub writer {
     my $u = shift;
-    return $u if $u->{'_dbcm'} ||= LJ::get_cluster_master($u);
-    return 0;
+    return LJ::get_cluster_master($u) || 0;
 }
 
 sub userpic {

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