]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
clear memcached cache in fixup_inboxes
authorEvan Prodromou <evan@prodromou.name>
Thu, 13 Nov 2008 22:35:14 +0000 (17:35 -0500)
committerEvan Prodromou <evan@prodromou.name>
Thu, 13 Nov 2008 22:35:14 +0000 (17:35 -0500)
darcs-hash:20081113223514-84dde-be89824e7986a9af30bd42e89228a0f7ce949240.gz

scripts/fixup_inboxes.php

index 14a9f86d3a70cbb252b6a163285199bb1ccf1671..c3ead16bf8827feabae26b8148b5f44a870622dd 100755 (executable)
@@ -38,6 +38,7 @@ common_log(LOG_INFO, 'Updating user inboxes.');
 
 $user = new User();
 $cnt = $user->find();
+$cache = common_memcache();
 
 while ($user->fetch()) {
     common_log(LOG_INFO, 'Updating inbox for user ' . $user->id);
@@ -62,4 +63,7 @@ while ($user->fetch()) {
        $user->query('COMMIT');
        $inbox->free();
        unset($inbox);
+       if ($cache) {
+               $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
+       }
 }