Branch: Tag:

2007-09-20

2007-09-20 10:28:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added roxen.invalid{ate,p}().

Rev: server/base_server/roxen.pike:1.970

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.969 2007/09/10 11:55:51 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.970 2007/09/20 10:28:13 grubba Exp $";      //! @appears roxen   //!
4217:    return data;   }    + //! Check if a cache key has been marked invalid (aka stale). + int(0..1) invalidp(CacheKey key) + { +  catch { +  return !key || (key->invalidp && key->invalidp()); +  }; +  return !key; + } +  + //! Invalidate (mark as stale) a cache key. + void invalidate(CacheKey key) + { +  if (!key) return; +  catch { +  if (key->invalidate) { +  key->invalidate(); +  return; +  } +  }; +  if (key) destruct(key); + } +    void create()   {    // Register localization projects