vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r22831: LJSUP-13562: Cache timezone_guess in pro...

Committer: vad
LJSUP-13562: Cache timezone_guess in process memory for one request
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-09-06 14:58:44 UTC (rev 22830)
+++ trunk/cgi-bin/LJ/User.pm	2012-09-06 15:25:57 UTC (rev 22831)
@@ -6384,7 +6384,7 @@
 
     foreach my $key (@keys) {
         $key =~ s/\*/$u->{userid}/g;
-        LJ::MemCache::delete([ $u->{userid}, $key ]);
+        LJ::MemCacheProxy::delete([ $u->{userid}, $key ]);
     }
 
     my $bio = $dbcm->selectrow_array('SELECT bio FROM userbio WHERE userid = ?', undef, $u->{userid});
@@ -8213,7 +8213,7 @@
 
     # next, check memcache
     my $memkey = [$u->userid, 'timezone_guess:' . $u->userid];
-    my $memcache_data = LJ::MemCache::get($memkey);
+    my $memcache_data = LJ::MemCacheProxy::get($memkey);
     if ($memcache_data) {
         # fill the request cache since it was empty
         $u->{_timezone_guess} = $memcache_data;
@@ -8250,7 +8250,7 @@
         # set the caches
         $u->{_timezone_guess} = $$offsetref;
         my $expire = 60*60*24; # 24 hours
-        LJ::MemCache::set($memkey, $$offsetref, $expire);
+        LJ::MemCacheProxy::set($memkey, $$offsetref, $expire);
     }
 
     return 1;

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