+ static function memGet($k, $v)
+ {
+ if (!self::$cache) {
+ return self::staticGet($k, $v);
+ }
+
+ $ck = self::cacheKey($k, $v);
+
+ $sn = self::$cache->get($ck);
+
+ if (empty($sn)) {
+ $sn = self::staticGet($k, $v);
+ if (!empty($sn)) {
+ self::$cache->set($ck, $sn);
+ }
+ }
+
+ return $sn;
+ }
+
+ function decache()
+ {
+ if (self::$cache) {
+ $keys = array('nickname', 'hostname', 'pathname');
+ foreach ($keys as $k) {
+ $ck = self::cacheKey($k, $this->$k);
+ self::$cache->delete($ck);
+ }
+ }
+ }
+
+ function update($orig=null)
+ {
+ if (is_object($orig)) {
+ $orig->decache(); # might be different keys
+ }
+ return parent::update($orig);
+ }
+
+ function delete()
+ {
+ $this->decache(); # while we still have the values!
+ return parent::delete();
+ }
+
+ static function setupSite($servername, $pathname, $wildcard)