mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-02-24 08:09 am

[dw-free] Properly clear all user picture memcache keys

[commit: http://hg.dwscoalition.org/dw-free/rev/410a641b0236]

http://bugs.dwscoalition.org/show_bug.cgi?id=353

Add memcache wipe of userpic descriptions in LJ::Userpic memcache kill.

Patch by [personal profile] afuna.

--------------------------------------------------------------------------------
diff -r d6700d0144fc -r 410a641b0236 cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Tue Feb 24 08:06:54 2009 +0000
+++ b/cgi-bin/LJ/User.pm	Tue Feb 24 08:09:05 2009 +0000
@@ -4917,7 +4917,7 @@ sub wipe_major_memcache
     foreach my $key ("userid","bio","talk2ct","talkleftct","log2ct",
                      "log2lt","memkwid","dayct2","s1overr","s1uc","fgrp",
                      "wt_edges","wt_edges_rev","tu","upicinf","upiccom",
-                     "upicurl", "intids", "memct", "lastcomm")
+                     "upicurl", "upicdes", "intids", "memct", "lastcomm")
     {
         LJ::memcache_kill($userid, $key);
     }
diff -r d6700d0144fc -r 410a641b0236 cgi-bin/LJ/Userpic.pm
--- a/cgi-bin/LJ/Userpic.pm	Tue Feb 24 08:06:54 2009 +0000
+++ b/cgi-bin/LJ/Userpic.pm	Tue Feb 24 08:09:05 2009 +0000
@@ -688,6 +688,8 @@ sub delete_cache {
     LJ::MemCache::delete($memkey);
     $memkey = [$u->{'userid'},"upicurl:$u->{'userid'}"];
     LJ::MemCache::delete($memkey);
+    $memkey = [$u->{'userid'},"upicdes:$u->{'userid'}"];
+    LJ::MemCache::delete($memkey);
 
     # userpic2 rows for a given $u
     $memkey = LJ::Userpic->memkey($u);
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org