vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17943: LJSUP-7635: clean friendstimes db cache

Committer: vsukhanov
LJSUP-7635: clean friendstimes db cache
U   trunk/bin/maint/clean_caches.pl
Modified: trunk/bin/maint/clean_caches.pl
===================================================================
--- trunk/bin/maint/clean_caches.pl	2010-12-16 07:38:42 UTC (rev 17942)
+++ trunk/bin/maint/clean_caches.pl	2010-12-16 08:37:19 UTC (rev 17943)
@@ -25,6 +25,18 @@
         $dbh->do("DELETE FROM underage WHERE timeof < (UNIX_TIMESTAMP() - 86400*90) LIMIT 2000");
     }
 
+    print "-I- Cleaning friendstimes.\n";
+    foreach my $c (@LJ::CLUSTERS) {
+        my $dbcm = LJ::get_cluster_master($c);
+        $dbcm->do("DELETE FROM friendstimes WHERE added < UNIX_TIMESTAMP() - 86400*7 LIMIT 100000");
+    }
+
+    print "-I- Cleaning comet_history.\n";
+    foreach my $c (@LJ::CLUSTERS) {
+        my $dbcm = LJ::get_cluster_master($c);
+        $dbcm->do("DELETE FROM comet_history WHERE added < UNIX_TIMESTAMP() - 86400*10 LIMIT 100000");
+    }
+
     print "-I- Cleaning captcha sessions.\n";
     foreach my $c (@LJ::CLUSTERS) {
         my $dbcm = LJ::get_cluster_master($c);

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