MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / resetAll

Method resetAll

server/src/middleware/pg-rate-limit-store.ts:107–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 async resetAll(): Promise<void> {
108 if (!isDatabaseInitialized()) return;
109 try {
110 if (this.prefix) {
111 await query(`DELETE FROM rate_limit_hits WHERE key LIKE $1`, [this.prefix + '%']);
112 } else {
113 await query(`DELETE FROM rate_limit_hits`);
114 }
115 } catch (err) {
116 logger.warn({ err }, 'Rate limit resetAll failed');
117 }
118 }
119}
120
121interface CachedEntry {

Callers

nothing calls this directly

Calls 3

isDatabaseInitializedFunction · 0.85
queryFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected