@travetto/cache 8.0.0-alpha.11 → 8.0.0-alpha.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 +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/cache",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Caching functionality with decorators for declarative use.",
|
|
6
6
|
"keywords": [
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"directory": "module/cache"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/di": "^8.0.0-alpha.
|
|
30
|
-
"@travetto/model": "^8.0.0-alpha.
|
|
29
|
+
"@travetto/di": "^8.0.0-alpha.11",
|
|
30
|
+
"@travetto/model": "^8.0.0-alpha.12"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@travetto/test": "^8.0.0-alpha.
|
|
34
|
-
"@travetto/transformer": "^8.0.0-alpha.
|
|
33
|
+
"@travetto/test": "^8.0.0-alpha.11",
|
|
34
|
+
"@travetto/transformer": "^8.0.0-alpha.7"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@travetto/transformer": {
|
package/src/service.ts
CHANGED
|
@@ -107,8 +107,10 @@ export class CacheService {
|
|
|
107
107
|
async deleteAll(keySpace: string): Promise<void> {
|
|
108
108
|
if (ModelIndexedUtil.isSupported(this.#modelService)) {
|
|
109
109
|
const removes: Promise<void>[] = [];
|
|
110
|
-
for await (const
|
|
111
|
-
|
|
110
|
+
for await (const batch of this.#modelService.listByIndex(CacheRecord, keySpaceIndex, { keySpace })) {
|
|
111
|
+
for (const item of batch) {
|
|
112
|
+
removes.push(this.#modelService.delete(CacheRecord, item.id));
|
|
113
|
+
}
|
|
112
114
|
}
|
|
113
115
|
await Promise.all(removes);
|
|
114
116
|
} else {
|