Branch: Tag:

2006-12-12

2006-12-12 15:06:10 by Martin Stjernholm <mast@lysator.liu.se>

Added ArgCache.key_exists which was missing from the new argcache
implementation (it's tested by the self test).

Rev: server/base_server/roxen.pike:1.953

6:   // 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   //!
3980:    }       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 );
3989:    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)