From 66f03717cd2f6a96cf1b8e02ea53f09594b0c29b Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Wed, 2 Jul 2008 21:53:00 +0200 Subject: [PATCH] Prunes older entries in table search_autocomplete (will speed up the autocompletion cache). Signed-off-by: Vincent Zanotti --- bin/cron/clean.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cron/clean.php b/bin/cron/clean.php index 3c0590d..9744d97 100755 --- a/bin/cron/clean.php +++ b/bin/cron/clean.php @@ -43,6 +43,8 @@ query("ALTER TABLE groupesx_def ORDER BY text"); query("ALTER TABLE secteur ORDER BY text"); query("ALTER TABLE sections ORDER BY text"); +// Prunes older autocomplete queries. +query("DELETE FROM search_autocomplete WHERE generated < DATE_SUB(NOW(), INTERVAL 1 DAY)"); // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?> -- 2.1.4