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.1053 2009/12/01 18:04:41 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1054 2009/12/02 00:53:31 jonasw 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:3899:    // Might have been insterted from elsewhere.    QUERY("REPLACE INTO "+name+    " (id,uid,atime) VALUES (%s,%s,UNIX_TIMESTAMP())",    id, uid );    }       return 0;    }       -  string data( array|string|mapping args, RequestID id, int|void nodraw ) +  string data( array|string|mapping args, RequestID id, int|void nodraw, +  int|void timeout )    //! Returns the actual raw image data of the image rendered from the    //! @[args] instructions.    //!    //! A non-zero @[nodraw] parameter means an image not already in the    //! cache will not be rendered on the fly, but instead return zero.    { -  mapping res = http_file_answer( args, id, nodraw ); +  mapping res = http_file_answer( args, id, nodraw, timeout );    return res && res->data;    }       mapping http_file_answer( array|string|mapping data,    RequestID id,    int|void nodraw, int|void timeout )    //! Returns a @[result mapping] like one generated by    //! @[Roxen.http_file_answer()] but for the image file    //! rendered from the `data' instructions.    //!
Roxen.git/server/base_server/roxen.pike:4333:    foreach( rows, mapping row )    if( row->contents != encoded_args ) {    report_error("ArgCache.create_key(): "    "Duplicate key found! Please report this to support@roxen.com: "    "id: %O, old data: %O, new data: %O\n",    id, row->contents, encoded_args);    error("ArgCache.create_key() Duplicate key found!\n");    }       if(sizeof(rows)) { -  QUERY("UPDATE LOW_PRIORITY "+name+"2 " -  " SET atime = NOW() " -  " WHERE id = %s", id); +     if (zero_type(timeout)) {    QUERY("UPDATE LOW_PRIORITY "+name+"2 " -  " SET timeout = NULL " +  " SET atime = NOW(), timeout = NULL "    " WHERE id = %s", id);    } else {    QUERY("UPDATE LOW_PRIORITY "+name+"2 " -  +  " SET atime = NOW() " +  " WHERE id = %s", id); +  QUERY("UPDATE LOW_PRIORITY "+name+"2 "    " SET timeout = %d "    " WHERE id = %s "    " AND timeout IS NOT NULL "    " AND timeout < %d",    timeout, id, timeout);    }    return;    }       QUERY( "INSERT INTO "+name+"2 "