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,