Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: configuration.pike,v 1.360 2000/09/04 08:34:05 per Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.361 2000/09/05 08:55:03 per Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:2098:    ModuleInfo|void moduleinfo,    int|void nostart )   {    MODULE_LOCK;    int id;    ModuleCopies module;    int pr;    mixed err;    int module_type;    +  +  datacache->flush(); +     if( sscanf(modname, "%s#%d", modname, id ) != 2 )    while( modules[ modname ] && modules[ modname ][ id ] )    id++;       int start_time = gethrtime();    mixed err;       if( !moduleinfo )    {    moduleinfo = roxen->find_module( modname );
Roxen.git/server/base_server/configuration.pike:2475:    }   }      int disable_module( string modname, int|void nodest )   {    MODULE_LOCK;    RoxenModule me;    int id, pr;    sscanf(modname, "%s#%d", modname, id );    +  datacache->flush(); +     ModuleInfo moduleinfo = roxen->find_module( modname );    mapping module = modules[ modname ];    string descr = moduleinfo->get_name() + (id ? " copy " + (id + 1) : "");       if(!module)    {    report_error("disable_module(): " +    LOC_M(42, "Failed to disable module:\n"    "No module by that name: \"%s\".\n"), modname);    return 0;
Roxen.git/server/base_server/configuration.pike:2761:   class DataCache   {    mapping(string:array(string|mapping(string:mixed))) cache = ([]);       int current_size;    int max_size;    int max_file_size;       int hits, misses;    +  void flush() +  { +  current_size = 0; +  cache = ([]); +  } +     static void clear_some_cache()    {    array q = indices( cache );    if(!sizeof(q))    {    current_size=0;    return;    }    for( int i = 0; i<sizeof( q )/10; i++ )    expire_entry( q[random(sizeof(q))] );