---
name: "clearStorageSync"
mode: "kit"
versionRequirements:
  - { name: "BaseKit", version: "2.0.1" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
title: "clearStorageSync - 清理本地数据缓存的同步版本"
---

## clearStorageSync

> [VERSION] BaseKit >= 2.0.1 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

### 描述

清理本地数据缓存

### 参数

无


### 示例代码

#### Demo

```tsx
import { clearStorage } from '@ray-js/ray'

// 清空本地数据缓存
clearStorage({
  success: () => console.log("已清空本地缓存"),
  fail: error => console.error(error),
});
```
