Skip to content

Commit f6747d8

Browse files
committed
save
1 parent f2f4c10 commit f6747d8

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,45 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [6.2.0] - October 21, 2025
9+
10+
### New Features
11+
12+
- **Added support for Contextual Multi-Armed Bandit (CMAB)**: Added support for CMAB experiments(Contextaul 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.
13+
14+
**CMAB Configuration Options**: The following new options has been added to configure the cmab cache:
15+
16+
```js
17+
import { createInstance } from '@optimizely/optimizely-sdk'
18+
19+
const optimizely = createInstance({
20+
// ... other config options
21+
cmab: {
22+
cacheSize: 1000, // Optional: Set CMAB cache size (default: 1000)
23+
cacheTtl: 300000, // Optional: Set CMAB cache TTL in milliseconds (default: 30 * 60 * 1000)
24+
cache: customCache // Optional: Custom cache implementation, instance of CacheWithRemnove interface
25+
}
26+
});
27+
```
28+
29+
**CMAB-Related OptimizelyDecideOptions**: New decide options are available to control CMAB caching behavior:
30+
31+
- `OptimizelyDecideOption.IGNORE_CMAB_CACHE`: Bypass CMAB cache for fresh decisions
32+
- `OptimizelyDecideOption.RESET_CMAB_CACHE`: Clear and reset CMAB cache before making decisions
33+
- `OptimizelyDecideOption.INVALIDATE_USER_CMAB_CACHE`: Invalidate CMAB cache for the particular user and experiment
34+
35+
```js
36+
// Example usage with CMAB decide options
37+
const decision = await userContext.decideAsync('feature-flag-key', [
38+
optimizelySdk.enums.OptimizelyDecideOption.IGNORE_CMAB_CACHE
39+
]);
40+
```
41+
42+
### Bug Fixes
43+
- 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))
44+
- Fixed typo in clientEngine option ([#1095](https://github.com/optimizely/javascript-sdk/pull/1095))
45+
46+
847
## [6.1.0] - September 8, 2025
948

1049
### New Features

0 commit comments

Comments
 (0)