---
title: cache_id
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/llmdatadistdev/llmpr_42_0050.html
sourcePath: /source/zh/canncommercial/900/others/llmdatadistdev/llmpr_42_0050.html
indexId: 81c6be3d3427cc7f9d585620ade5f7773b1e4c379d7a570dfb070703b3c1c9f370
---
# cache_id

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | x |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


说明：针对 Atlas A2 训练系列产品 / Atlas A2 推理系列产品 ，仅支持Atlas 800I A2 推理服务器、A200I A2 Box 异构组件。


#### 函数功能

获取KvCache的id。


#### 函数原型

```
@property
cache_id() -> int
```


#### 参数说明

无


#### 调用示例

```
kv_cache = kv_cache_manager.allocate_cache(cache_desc, cache_keys)
print(kv_cache.cache_id)
```


#### 返回值

正常情况返回类型为KvCache的id。


#### 约束说明

无
