@rxdi/core 0.7.164 → 0.7.165
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.
|
@@ -2,10 +2,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
2
2
|
import { CacheLayer } from './cache-layer';
|
|
3
3
|
import { CacheLayerItem, CacheLayerInterface, Duplicates } from './cache-layer.interfaces';
|
|
4
4
|
import { ServiceArgumentsInternal } from '../../decorators/module/module.interfaces';
|
|
5
|
-
import { BootstrapLogger } from '../bootstrap-logger/index';
|
|
6
5
|
export declare class CacheService {
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(logger: BootstrapLogger);
|
|
9
6
|
_cachedLayers: BehaviorSubject<CacheLayer<CacheLayerItem<any>>[]>;
|
|
10
7
|
map: Map<any, any>;
|
|
11
8
|
config: any;
|
|
@@ -5,9 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
8
|
var CacheService_1;
|
|
12
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
10
|
exports.CacheService = void 0;
|
|
@@ -16,13 +13,8 @@ const operators_1 = require("rxjs/operators");
|
|
|
16
13
|
const cache_layer_1 = require("./cache-layer");
|
|
17
14
|
const events_1 = require("../../helpers/events");
|
|
18
15
|
const Service_1 = require("../../decorators/service/Service");
|
|
19
|
-
const index_1 = require("../bootstrap-logger/index");
|
|
20
|
-
const FRIENDLY_ERROR_MESSAGES = {
|
|
21
|
-
TRY_TO_UNSUBSCRIBE: 'Someone try to unsubscribe from collection directly... agghhh.. read docs! Blame: '
|
|
22
|
-
};
|
|
23
16
|
let CacheService = CacheService_1 = class CacheService {
|
|
24
|
-
constructor(
|
|
25
|
-
this.logger = logger;
|
|
17
|
+
constructor() {
|
|
26
18
|
this._cachedLayers = new rxjs_1.BehaviorSubject([]);
|
|
27
19
|
this.map = new Map();
|
|
28
20
|
this.config = {};
|
|
@@ -149,7 +141,6 @@ let CacheService = CacheService_1 = class CacheService {
|
|
|
149
141
|
cacheLayer.items.constructor.prototype.unsubsribeFromLayer =
|
|
150
142
|
cacheLayer.items.constructor.prototype.unsubscribe;
|
|
151
143
|
cacheLayer.items.constructor.prototype.unsubscribe = () => {
|
|
152
|
-
console.error(FRIENDLY_ERROR_MESSAGES.TRY_TO_UNSUBSCRIBE + cacheLayer.name);
|
|
153
144
|
};
|
|
154
145
|
}
|
|
155
146
|
OnExpire(layerInstance) {
|
|
@@ -187,7 +178,6 @@ let CacheService = CacheService_1 = class CacheService {
|
|
|
187
178
|
}
|
|
188
179
|
};
|
|
189
180
|
CacheService = CacheService_1 = __decorate([
|
|
190
|
-
(0, Service_1.Service)()
|
|
191
|
-
__metadata("design:paramtypes", [index_1.BootstrapLogger])
|
|
181
|
+
(0, Service_1.Service)()
|
|
192
182
|
], CacheService);
|
|
193
183
|
exports.CacheService = CacheService;
|