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.952 2006/11/30 12:41:56 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.953 2006/12/12 15:06:10 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:3973:    }    mapping args = decode_value(encoded_args);    cache[id] = args + ([]);    if( sizeof( cache ) >= CACHE_SIZE )    // Yowza! Garbing bulldoze style. /mast    cache = ([]);    return args;    }       void delete( string id ) -  //! Remove the data element stored under the key 'id'. +  //! Remove the data element stored under the key @[id].    {    LOCK();    (plugins->delete-({0}))( id );    m_delete( cache, id );       QUERY( "DELETE FROM "+name+"2 WHERE id = %s", id );    }    -  +  int key_exists( string id ) +  //! Does the key @[id] exist in the cache? Returns 1 if it does, 0 +  //! if it was not present. +  { +  if( cache[id] ) return 1; +  if (read_encoded_args(id, 0) || plugins_read_encoded_args(id)) return 1; +  return 0; +  } +    #define SECRET_TAG "££"       int write_dump(Stdio.File file, int from_time)    //! Dumps all entries that have been @[refresh_arg]'ed at or after    //! @[from_time] to @[file]. All existing entries are dumped if    //! @[from_time] is zero.    //!    //! @returns    //! Returns 0 if writing failed, -1 if there was no new entries, 1    //! otherwise.