Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Optimizely C# SDK Changelog

## 4.2.0
Nov 13, 2025

### New Features

- **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, `decide` and related methods must be used.

#### CMAB Configuration Options

The following new configuration options have been added for CMAB:

```csharp
using OptimizelySDK;

// Configure CMAB settings before creating the Optimizely instance
var cmabConfig = new CmabConfig()
.SetCacheSize(1000) // Optional: Set CMAB cache size (default: 1000)
.SetCacheTtl(TimeSpan.FromMinutes(30)); // Optional: Set CMAB cache TTL (default: 30 minutes)
// .SetCache(customCache) // Optional: Custom cache implementation
OptimizelyFactory.SetCmabConfig(cmabConfig);

var optimizely = OptimizelyFactory.NewDefaultInstance("SDK_KEY_HERE");
```

#### CMAB-Related OptimizelyDecideOptions

New decide options are available to control CMAB caching behavior:

- `OptimizelyDecideOption.IGNORE_CMAB_CACHE`: Bypass CMAB cache for fresh decisions
- `OptimizelyDecideOption.RESET_CMAB_CACHE`: Clear and reset CMAB cache before making decisions
- `OptimizelyDecideOption.INVALIDATE_USER_CMAB_CACHE`: Invalidate CMAB cache for the particular user and experiment

```csharp
using OptimizelySDK.OptimizelyDecisions;

// Example usage with CMAB decide options
var user = optimizely.CreateUserContext("user123");
var decision = user.Decide("feature-flag-key", new[]
{
OptimizelyDecideOption.IGNORE_CMAB_CACHE
});
```

## 4.1.0
November 7th, 2024

Expand Down
6 changes: 3 additions & 3 deletions OptimizelySDK.DemoApp/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
6 changes: 3 additions & 3 deletions OptimizelySDK.Net35/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
6 changes: 3 additions & 3 deletions OptimizelySDK.Net40/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
6 changes: 3 additions & 3 deletions OptimizelySDK.NetStandard16/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
6 changes: 3 additions & 3 deletions OptimizelySDK.NetStandard20/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
6 changes: 3 additions & 3 deletions OptimizelySDK.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
6 changes: 3 additions & 3 deletions OptimizelySDK/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyInformationalVersion("4.1.0")] // Used by NuGet.
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
[assembly: AssemblyInformationalVersion("4.2.0")] // Used by NuGet.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ User can provide variables using following procedure:
```
<configSections>
<section name="optlySDKConfigSection"
type="OptimizelySDK.OptimizelySDKConfigSection, OptimizelySDK, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" />
type="OptimizelySDK.OptimizelySDKConfigSection, OptimizelySDK, Version=4.2.0.0, Culture=neutral, PublicKeyToken=null" />
</configSections>
```
2. Now add **optlySDKConfigSection** below **<configSections>**. In this section you can add and set following **HttpProjectConfigManager** and **BatchEventProcessor** variables:
Expand Down
Loading