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 - 2009, 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.1082 2011/11/30 11:09:22 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1083 2011/11/30 11:10:50 wellhard 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:3862:    QUERY( "DELETE FROM "+name+" WHERE id=%s", id);    return 0;    }       QUERY("UPDATE "+name+" SET atime=UNIX_TIMESTAMP() WHERE id=%s",id );    return meta_cache_insert( id, m );    }       protected void sync_meta()    { +  mapping tmp = meta_cache; +  meta_cache = ([]);    // Sync cached atimes. -  foreach(meta_cache; string id; array value) { +  foreach(tmp; string id; array value) {    if (value[1])    QUERY("UPDATE "+name+" SET atime=%d WHERE id=%s",    value[1], id);    } -  meta_cache = ([]); +     }       void flush(int|void age)    //! Flush the cache. If an age (an integer as returned by    //! @[time()]) is provided, only images with their latest access before    //! that time are flushed.    {    int num;   #if defined(DEBUG) || defined(IMG_CACHE_DEBUG)    int t = gethrtime();