mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:21:23 +00:00
refactor: require target for message actions
This commit is contained in:
@@ -39,6 +39,12 @@ export class DirectoryCache<T> {
|
||||
this.cache.set(key, { value, fetchedAt: Date.now() });
|
||||
}
|
||||
|
||||
clearMatching(match: (key: string) => boolean): void {
|
||||
for (const key of this.cache.keys()) {
|
||||
if (match(key)) this.cache.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
clear(cfg?: ClawdbotConfig): void {
|
||||
this.cache.clear();
|
||||
if (cfg) this.lastConfigRef = cfg;
|
||||
|
||||
Reference in New Issue
Block a user