bruce-models 2.0.6 → 2.0.8

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.
@@ -3893,6 +3893,7 @@
3893
3893
  url += "-stg.net/";
3894
3894
  break;
3895
3895
  case exports.Api.EEnv.UAT:
3896
+ codeWord = "guardian";
3896
3897
  url += "-uat.net/";
3897
3898
  break;
3898
3899
  case exports.Api.EEnv.PROD:
@@ -4313,6 +4314,7 @@
4313
4314
  url += "-stg.net/";
4314
4315
  break;
4315
4316
  case exports.Api.EEnv.UAT:
4317
+ codeWord = "guardian";
4316
4318
  url += "-uat.net/";
4317
4319
  break;
4318
4320
  case exports.Api.EEnv.PROD:
@@ -5873,6 +5875,28 @@
5873
5875
  UTC.FromDate = FromDate;
5874
5876
  })(exports.UTC || (exports.UTC = {}));
5875
5877
 
5878
+ class LRUCache {
5879
+ constructor(capacity) {
5880
+ this.capacity = capacity;
5881
+ this.cache = new Map();
5882
+ }
5883
+ Get(key) {
5884
+ const value = this.cache.get(key);
5885
+ if (value) {
5886
+ this.cache.delete(key);
5887
+ this.cache.set(key, value);
5888
+ }
5889
+ return value;
5890
+ }
5891
+ Set(key, value) {
5892
+ if (this.cache.size >= this.capacity) {
5893
+ const leastRecentlyUsedKey = this.cache.keys().next().value;
5894
+ this.cache.delete(leastRecentlyUsedKey);
5895
+ }
5896
+ this.cache.set(key, value);
5897
+ }
5898
+ }
5899
+
5876
5900
  (function (EntityAttachmentType) {
5877
5901
  function GetCacheKey(id) {
5878
5902
  return exports.Api.ECacheKey.AttachmentType + exports.Api.ECacheKey.Id + id;
@@ -10584,6 +10608,7 @@
10584
10608
  exports.BruceEvent = BruceEvent;
10585
10609
  exports.CacheControl = CacheControl;
10586
10610
  exports.DelayQueue = DelayQueue;
10611
+ exports.LRUCache = LRUCache;
10587
10612
 
10588
10613
  Object.defineProperty(exports, '__esModule', { value: true });
10589
10614