---
title: cache_id
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/hixlug/llmprv2_42_0041.html
sourcePath: /source/zh/canncommercial/900/API/hixlug/llmprv2_42_0041.html
indexId: f5e7a98b4fc2576da25a6eb950ae8c34c2d1496137dfa9405b712d0919da217361
---
# 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 异构组件。


#### 函数功能

获取Cache的id。


#### 函数原型

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


#### 参数说明

无


#### 调用示例

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


#### 返回值

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


#### 约束说明

无
