---
title: BlocksCacheKey
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/hixlug/llmprv2_42_0058.html
sourcePath: /source/zh/canncommercial/900/API/hixlug/llmprv2_42_0058.html
indexId: 0e1af03bee4959e6ddf4f1921b13242805e4991670b7652e6484ca841041895061
---
# BlocksCacheKey

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| 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 异构组件。


#### 函数功能

构造BlocksCacheKey，通常在CacheManager的allocate_blocks_cache、pull_blocks、push_blocks接口中作为参数类型使用。


#### 函数原型

```
__init__(*args, **kwargs)
```


#### 参数说明

| 参数名称 | 数据类型 | 取值说明 |
| --- | --- | --- |
| cluster\_id | int | cache所在远端集群id，必填。 |
| model\_id | int | cache关联的model\_id，默认为0。 |


#### 调用示例

```
from llm_datadist import BlocksCacheKey
blocks_cache_key = BlocksCacheKey(0, 0)
```


#### 返回值

正常情况下返回BlocksCacheKey的实例。

传入数据类型错误情况下会抛出TypeError或ValueError异常。


#### 约束说明

无
