Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.905 2007/03/15 16:46:24 anders Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.906 2007/05/10 12:54:26 mast Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:3186:       num = sizeof( ids );       int q;    while(q<sizeof(ids)) {    string list = map(ids[q..q+99], get_db()->quote) * "','";    q+=100;    QUERY( "DELETE FROM "+name+" WHERE id in ('"+list+"')" );    }    + #if 0 +  // Disabled. This can take a significant amount of time to run, +  // and we really can't afford an unresponsive image cache - it can +  // easily hang all handler threads. Besides, it's doubtful if this +  // is of any use since the space for the deleted records probably +  // will get reused soon enough anyway. /mast    if( num )    catch    {    // Old versions of Mysql lacks OPTIMIZE. Not that we support    // them, really, but it might be nice not to throw an error, at    // least.    QUERY( "OPTIMIZE TABLE "+name );    }; -  + #endif      #ifdef DEBUG    report_debug("%s removed, %dms\n",    (num==-1?"all":num?(string)num:"none"),    (gethrtime()-t)/1000);   #endif    }       array(int) status(int|void age)    //! Return the total number of images in the cache, their cumulative
Roxen.git/server/base_server/roxen.pike:3520:    {    catch(sync_meta());    setup_tables();    }       void do_cleanup( )    {    // Flushes may be costly in large sites (at least the OPTIMIZE TABLE    // command) so schedule next run sometime after 04:30 the day after    // tomorrow. +  // +  // Note: The OPTIMIZE TABLE step has been disabled. /mast    int now = time();    mapping info = localtime(now);    int wait = (int) ((24 - info->hour) + 24 + 4.5) * 3600 + random(500);    background_run(wait, do_cleanup);       // Remove items older than one week    flush(now - 7 * 3600 * 24);    }       void create( string id, function draw_func )