Branch: Tag:

2000-11-21

2000-11-21 13:17:29 by Per Hedbor <ph@opera.com>

Abstraction

Rev: server/etc/modules/Roxen.pmod:1.51
Rev: server/modules/graphics/gbutton.pike:1.67

1:   /* -  * $Id: Roxen.pmod,v 1.50 2000/11/16 11:52:15 per Exp $ +  * $Id: Roxen.pmod,v 1.51 2000/11/21 13:17:29 per Exp $    *    * Various helper functions.    *
1310:    set_cookie( id, name, value, -time(1), domain, path );   }    + void add_cache_stat_callback( RequestID id, string file, int mtime ) + { +  while( id->misc->orig ) +  id = id->misc->orig; +  if( !id->misc->_cachecallbacks ) return; +  id->misc->_cachecallbacks += ({ lambda( RequestID id, object key ) { +  Stat st = file_stat( file ); +  if( !st || (st[ST_MTIME] != mtime) ) +  { +  destruct( key ); +  return 0; +  } +  return 1; +  } }); + } +    void add_cache_callback( RequestID id,function(RequestID,object:int) callback )   //! The request id object is not yet fully initialized in this callback.   //! The only valid fields are raw_url and request_headers.