@travetto/cache 5.0.11 → 5.0.13
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 +5 -5
- package/src/service.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/cache",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13",
|
|
4
4
|
"description": "Caching functionality with decorators for declarative use.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"directory": "module/cache"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@travetto/di": "^5.0.
|
|
29
|
-
"@travetto/model": "^5.0.
|
|
28
|
+
"@travetto/di": "^5.0.12",
|
|
29
|
+
"@travetto/model": "^5.0.13"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@travetto/test": "^5.0.
|
|
33
|
-
"@travetto/transformer": "^5.0.
|
|
32
|
+
"@travetto/test": "^5.0.14",
|
|
33
|
+
"@travetto/transformer": "^5.0.10"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"@travetto/transformer": {
|
package/src/service.ts
CHANGED
|
@@ -59,7 +59,7 @@ export class CacheService {
|
|
|
59
59
|
|
|
60
60
|
if (delta < 0) { // Expired
|
|
61
61
|
await this.#modelService.delete(CacheRecord, id);
|
|
62
|
-
throw new CacheError('Key expired', 'data');
|
|
62
|
+
throw new CacheError('Key expired', { category: 'data' });
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// If half way to eviction, not perfect, but will reduce the amount of unnecessary updates
|
|
@@ -119,7 +119,7 @@ export class CacheService {
|
|
|
119
119
|
}
|
|
120
120
|
await Promise.all(removes);
|
|
121
121
|
} else {
|
|
122
|
-
throw new AppError('Unable to delete all on an un-indexed database'
|
|
122
|
+
throw new AppError('Unable to delete all on an un-indexed database');
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|