From: Lo?c C. <lo...@us...> - 2001-12-08 10:37:14
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv1086/chat/lib/index_libs Modified Files: main_index.lib.php3 Log Message: Use to new cache feature to define a gap between tables optimizations Index: main_index.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -r1.47 -r1.48 *** main_index.lib.php3 2001/12/04 20:01:04 1.47 --- main_index.lib.php3 2001/12/08 10:37:11 1.48 *************** *** 400,409 **** /** ! * Optimize some of the tables */ ! $dbLink->optimize(C_ROOM_TBL); ! $dbLink->optimize(C_MSG_TBL); ! $dbLink->optimize(C_USR_TBL); ! $dbLink->optimize(C_SESS_TBL); --- 400,418 ---- /** ! * Optimize some of the tables if required */ ! $lastOptimization = (defined('_CHAT_PATH') ? _CHAT_PATH : '') . 'cache/optimized.cache'; ! if (!file_exists($lastOptimization) ! || (filemtime($lastOptimization) + C_DB_OPT_DELAY*60*60 < time())) ! { ! $dbLink->optimize(C_ROOM_TBL); ! $dbLink->optimize(C_MSG_TBL); ! $dbLink->optimize(C_USR_TBL); ! $dbLink->optimize(C_SESS_TBL); ! ! // Update the modification time of the optimization cache file (create ! // it if it doesn't exist) ! $tmp = @touch($lastOptimization); ! } |