Skip to content

Commit 9fd02f9

Browse files
authored
[FSSDK-11877] Increase cmab cache size to 10000 to align with odp cache size (#425)
* Update CMAB default cache size from 100 to 1000 to match Ruby SDK - Changed DefaultCacheSize from 100 to 1000 in pkg/cmab/config.go - Updated corresponding test in pkg/cmab/config_test.go - Aligns with Ruby SDK default cache size (PR #377) - All tests passing * align cmab cache size with odp size - 10000 * Remove TestDefaultConstants test and unused time import
1 parent c1318f2 commit 9fd02f9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

pkg/cmab/config.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ import (
2424
)
2525

2626
const (
27-
// DefaultCacheSize is the default size for CMAB cache
28-
DefaultCacheSize = 1000
27+
// DefaultCacheSize is the default size for CMAB cache (aligned with ODP segments cache)
28+
DefaultCacheSize = 10000
29+
2930
// DefaultCacheTTL is the default TTL for CMAB cache (30 minutes to match agent)
3031
DefaultCacheTTL = 30 * time.Minute
3132

pkg/cmab/config_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package cmab
1818

1919
import (
2020
"testing"
21-
"time"
2221

2322
"github.com/stretchr/testify/assert"
2423
)
@@ -33,9 +32,3 @@ func TestNewDefaultConfig(t *testing.T) {
3332
assert.Equal(t, DefaultMaxRetries, config.RetryConfig.MaxRetries)
3433
assert.Nil(t, config.Cache) // Should be nil by default
3534
}
36-
37-
func TestDefaultConstants(t *testing.T) {
38-
assert.Equal(t, 1000, DefaultCacheSize)
39-
assert.Equal(t, 30*time.Minute, DefaultCacheTTL)
40-
assert.Equal(t, 10*time.Second, DefaultHTTPTimeout)
41-
}

0 commit comments

Comments
 (0)