Skip to content

Commit cbd7b3d

Browse files
committed
Reset prefix cache metric
Signed-off-by: tovam <tovam@pliops.com>
1 parent 523051a commit cbd7b3d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

vllm/v1/core/sched/scheduler.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,9 +1247,17 @@ def reset_prefix_cache(self, reset_connector: bool = False) -> bool:
12471247

12481248
def reset_connector_cache(self) -> bool:
12491249
if self.connector is None:
1250-
logger.warning("reset_connector called but no KV connector configured.")
1250+
logger.warning("reset_connector called but no KV connector is configured.")
12511251
return False
1252-
return self.connector.reset_cache() is not False
1252+
1253+
if self.connector.reset_cache() is False:
1254+
return False
1255+
1256+
if self.log_stats:
1257+
assert self.connector_prefix_cache_stats is not None
1258+
self.connector_prefix_cache_stats.reset = True
1259+
1260+
return True
12531261

12541262
def make_stats(
12551263
self,

0 commit comments

Comments
 (0)