@resolveio/server-lib 20.13.1 → 20.13.3

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.
@@ -114,7 +114,7 @@ export declare class MongoManager {
114
114
  private generateCacheKey;
115
115
  private getFromCache;
116
116
  private addToCache;
117
- invalidateQueryCache(collection: string): void;
117
+ invalidateQueryCache(collection: string, bypassLocalOplog?: boolean): void;
118
118
  clearQueryCache(reason?: string): void;
119
119
  private setupChangeStream;
120
120
  private teardownChangeStream;
@@ -798,8 +798,9 @@ var MongoManager = /** @class */ (function () {
798
798
  this._cacheMap.push({ collections: collections, key: cacheKey });
799
799
  }
800
800
  };
801
- MongoManager.prototype.invalidateQueryCache = function (collection) {
801
+ MongoManager.prototype.invalidateQueryCache = function (collection, bypassLocalOplog) {
802
802
  var e_3, _a, e_4, _b;
803
+ if (bypassLocalOplog === void 0) { bypassLocalOplog = false; }
803
804
  var collectionCacheMap = this._cacheMap.filter(function (a) { return a.collections.includes(collection); });
804
805
  if (resolveio_server_app_1.ResolveIOServer.getMainServer().getSubscriptionManager() && resolveio_server_app_1.ResolveIOServer.getMainServer().getSubscriptionManager().getEnableDebug()) {
805
806
  console.log(new Date(), 'Mongo Invalidate Cache', collection);
@@ -843,6 +844,9 @@ var MongoManager = /** @class */ (function () {
843
844
  finally { if (e_4) throw e_4.error; }
844
845
  }
845
846
  this._cacheMap = this._cacheMap.filter(function (a) { return !a.collections.includes(collection); });
847
+ if (!bypassLocalOplog && resolveio_server_app_1.ResolveIOServer.getMainServer().getSubscriptionManager() && resolveio_server_app_1.ResolveIOServer.getMainServer().getSubscriptionManager().getUseLocalOplog()) {
848
+ resolveio_server_app_1.ResolveIOServer.getMainServer().getSubscriptionManager().notifyLocalOplog(collection, 'update');
849
+ }
846
850
  };
847
851
  MongoManager.prototype.clearQueryCache = function (reason) {
848
852
  var e_5, _a;