madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r23045: LJSUP-13604: Local cache [internal]

Committer: sbelyaev
LJSUP-13604: Local cache [internal]
U   trunk/cgi-bin/LJ/LocalCache/Redis.pm
Modified: trunk/cgi-bin/LJ/LocalCache/Redis.pm
===================================================================
--- trunk/cgi-bin/LJ/LocalCache/Redis.pm	2012-10-03 12:32:59 UTC (rev 23044)
+++ trunk/cgi-bin/LJ/LocalCache/Redis.pm	2012-10-03 12:46:01 UTC (rev 23045)
@@ -31,8 +31,12 @@
 sub __get_write_conneciton {
     if ($master_connection) {
         return $master_connection;
-    }   
+    }  
 
+    if (! $LJ::MASTER_REDIS_LIGTH_CACHE) {
+        return __get_read_connection();
+    } 
+
     $master_connection = eval { Redis->new(
         server => $LJ::MASTER_REDIS_LIGTH_CACHE,
         debug  => 0,

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