remove_cache_key
产品支持情况
产品 |
是否支持 |
---|---|
√ |
|
x |
|
x |
|
x |
|
x |
函数功能
移除CacheKey,仅当LLMRole为PROMPT时可调用。
移除CacheKey后,该Cache将无法再被pull_cache拉取。
函数原型
1 | remove_cache_key(cache_key: CacheKey) |
参数说明
参数名称 |
数据类型 |
取值说明 |
---|---|---|
cache_key |
需要被移除的CacheKey。 |
调用示例
1 2 | cache_keys = [CacheKey(prompt_cluster_id=0, req_id=1)] kv_cache_manager.remove_cache_key(cache_keys[0]) |
约束说明
- 如果CacheKey不存在或已移除,该操作为空操作。
- 本接口不支持并发调用。
父主题: KvCacheManager