# setMaxCacheFileSize (/zh-CN/api-reference/rtc/harmonyos/api-imediaplayercachemanager-setmaxcachefilesize)
> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).
## 参数 [#参数]
### `cacheSize` [#cachesize]
缓存媒体文件的总缓存上限,单位为字节。默认为 1 GB。
## 返回值 [#返回值]
- 0:方法调用成功。
- < 0:方法调用失败,详见 [MediaPlayerReason](/zh-CN/api-reference/rtc/harmonyos/enum-mediaplayerreason)。