> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# postJsCacheGenerationTask

APISummary
启动一个子线程任务，为当前模板生成 `js 代码缓存`。

## 语法

### Android

```java
public void postJsCacheGenerationTask(String bytecodeSourceUrl, boolean useV8);
```

#### 参数说明

- `bytecodeSourceUrl`: 当前模板的 `url`。
- `useV8`: 是否生成 `V8 代码缓存`，否则生成 `QuickJS 代码缓存`。

### iOS

```objc
- (void)postJsCacheGenerationTask:(nonnull NSString *)bytecodeSourceUrl;
```

#### 参数说明

- `bytecodeSourceUrl`: 模板的源 URL。

### Harmony

```typescript
public postJsCacheGenerationTask(bytecodeSourceUrl: string, useV8: boolean): void;
```

#### 参数说明

- `bytecodeSourceUrl`: 当前模板的 url。
- `useV8`: 是否生成 V8 代码缓存，否则生成 QuickJS 代码缓存。

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.template-bundle.post-js-cache-generation-task`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/template-bundle/post-js-cache-generation-task.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| post-js-cache-generation-task | Yes (2.8) | Yes (3.4) | Yes (2.8) | No | No | No |

**`post-js-cache-generation-task`**

Start a sub-thread task to generate the js code cache of the current template.

**Specifications:**

