For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/js-api/storage/clearStorage.md.

clearStorage

清空本地缓存。

扫码预览

扫码预览 clearStorage

支持版本

前端库版本不低于 0.0.17。

支持平台

平台支持情况
Android支持
iOS支持
PC不支持
HarmonyOS不支持

支持场景

场景支持情况
页面支持
卡片支持

使用说明

  • 只清空当前登录用户在当前应用插件下的缓存,不影响其他用户或其他应用插件的数据。

调用方式

异步 API

clearStorage(params?: object): Promise<object>

入参

无。

调用示例

import { clearStorage } from '@doubao-dev/framework/api';

await clearStorage();

成功返回

无返回字段。

错误处理

错误对象和通用错误码见 通用错误处理。

错误码

通用错误码

errNoerrMsg说明平台
102internal error内部错误Android