---
title: Javascript-SDK - 6.2.0
slug: feature-experimentation/release-notes/javascript-sdk-6-2-0
docTags: 
createdAt: 2026-07-20T15:45:02.592Z
---

## \[6.2.0] - October 23, 2025

[#620---october-23-2025](docId\:UImAHHqqpKTQYIAtGWvkv)

### New Features

[#new-features](docId\:UImAHHqqpKTQYIAtGWvkv)

- **Added support for Contextual Multi-Armed Bandit (CMAB)**: Added support for CMAB experiments(Contextual Bandits rules) with new configuration options and cache control. To get decision from CMAB rules, `decideAsync` and related methods must be used. The sync `decide` method does not support CMABs and will just skip CMAB rules while making decision for a flag.

### CMAB Configuration Options

:::Paragraph{indent="1"}
[#cmab-configuration-options](docId\:UImAHHqqpKTQYIAtGWvkv)
The following new options have been added to configure the cmab cache:
:::

```javascript
import { createInstance } from '@optimizely/optimizely-sdk'

const optimizely = createInstance({
  // ... other config options
  cmab: {
    cacheSize: 1000,      // Optional: Set CMAB cache size (default: 1000)
    cacheTtl: 30 * 60 * 1000,     // Optional: Set CMAB cache TTL in milliseconds (default: 30 * 60 * 1000)
    cache: customCache    // Optional: Custom cache implementation, instance of CacheWithRemove interface
  }
});
```

### CMAB-Related OptimizelyDecideOptions

:::Paragraph{indent="1"}
[#cmab-related-optimizelydecideoptions](docId\:UImAHHqqpKTQYIAtGWvkv)
New decide options are available to control CMAB caching behavior:
:::

:::Paragraph{listStyleType="disc" indent="2"}
`OptimizelyDecideOption.IGNORE_CMAB_CACHE`: Bypass CMAB cache for fresh decisions
:::

:::Paragraph{listStyleType="disc" indent="2"}
`OptimizelyDecideOption.RESET_CMAB_CACHE`: Clear and reset CMAB cache before making decisions
:::

:::Paragraph{listStyleType="disc" indent="2"}
`OptimizelyDecideOption.INVALIDATE_USER_CMAB_CACHE`: Invalidate CMAB cache for the particular user and experiment
:::

```javascript
// Example usage with CMAB decide options
const decision = await userContext.decideAsync('feature-flag-key', [
  optimizelySdk.enums.OptimizelyDecideOption.IGNORE_CMAB_CACHE
]);
```

### Bug Fixes

[#bug-fixes](docId\:UImAHHqqpKTQYIAtGWvkv)

- Flush events without closing client on page unload which causes event processing to stop working when page is loaded from bfcache ([#1087](https://github.com/optimizely/javascript-sdk/pull/1087))
- Fixed typo in clientEngine option ([#1095](https://github.com/optimizely/javascript-sdk/pull/1095))

[https://github.com/optimizely/javascript-sdk/releases/tag/v6.2.0](https://github.com/optimizely/javascript-sdk/releases/tag/v6.2.0)
