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.969 2007/09/10 11:55:51 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.970 2007/09/20 10:28:13 grubba 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:4210:   {    // FIXME: This code is probably not thread-safe!    if( charset == "iso-8859-1" ) return data;    if( !cached_decoders[ charset ] )    cached_decoders[ charset ] = Locale.Charset.decoder( charset );    data = cached_decoders[ charset ]->feed( data )->drain();    cached_decoders[ charset ]->clear();    return data;   }    + //! Check if a cache key has been marked invalid (aka stale). + int(0..1) invalidp(CacheKey key) + { +  catch { +  return !key || (key->invalidp && key->invalidp()); +  }; +  return !key; + } +  + //! Invalidate (mark as stale) a cache key. + void invalidate(CacheKey key) + { +  if (!key) return; +  catch { +  if (key->invalidate) { +  key->invalidate(); +  return; +  } +  }; +  if (key) destruct(key); + } +    void create()   {    // Register localization projects   #define __REG_PROJ Locale.register_project    __REG_PROJ("roxen_""start", "translations/%L/roxen_start.xml");    __REG_PROJ("roxen_""config", "translations/%L/roxen_config.xml");    __REG_PROJ("roxen_""message", "translations/%L/roxen_message.xml");    __REG_PROJ("admin_""tasks", "translations/%L/admin_tasks.xml");    Locale.set_default_project_path("translations/%L/%P.xml");   #undef __REG_PROJ