import type { ChannelDirectoryEntryKind, ChannelId } from "../../channels/plugins/types.public.js"; import type { OpenClawConfig } from "../../config/types.openclaw.js";
type CacheEntry<T> = {
value: T;
fetchedAt: number;
};
set(key: string, value: T, cfg: OpenClawConfig): void { this.resetIfConfigChanged(cfg); const now = Date.now(); this.pruneExpired(now); // Refresh insertion order so active keys are less likely to be evicted. if (this.cache.has(key)) { this.cache.delete(key);
} this.cache.set(key, { value, fetchedAt: now }); this.evictToMaxSize();
}
clearMatching(match: (key: string) => boolean): void { for (const key of this.cache.keys()) { if (match(key)) { this.cache.delete(key);
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.