@statsig/client-core 3.9.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/StatsigClientBase.js
CHANGED
|
@@ -19,6 +19,7 @@ const MemoKey_1 = require("./MemoKey");
|
|
|
19
19
|
const SafeJs_1 = require("./SafeJs");
|
|
20
20
|
const SessionID_1 = require("./SessionID");
|
|
21
21
|
const StorageProvider_1 = require("./StorageProvider");
|
|
22
|
+
const MAX_MEMO_CACHE_SIZE = 3000;
|
|
22
23
|
class StatsigClientBase {
|
|
23
24
|
constructor(sdkKey, adapter, network, options) {
|
|
24
25
|
var _a;
|
|
@@ -153,6 +154,9 @@ class StatsigClientBase {
|
|
|
153
154
|
return fn(name, options);
|
|
154
155
|
}
|
|
155
156
|
if (!(memoKey in this._memoCache)) {
|
|
157
|
+
if (Object.keys(this._memoCache).length >= MAX_MEMO_CACHE_SIZE) {
|
|
158
|
+
this._memoCache = {};
|
|
159
|
+
}
|
|
156
160
|
this._memoCache[memoKey] = fn(name, options);
|
|
157
161
|
}
|
|
158
162
|
return this._memoCache[memoKey];
|
package/src/StatsigMetadata.d.ts
CHANGED
package/src/StatsigMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;
|
|
4
|
-
exports.SDK_VERSION = '3.9.
|
|
4
|
+
exports.SDK_VERSION = '3.9.1';
|
|
5
5
|
let metadata = {
|
|
6
6
|
sdkVersion: exports.SDK_VERSION,
|
|
7
7
|
sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients
|