@zudojs/cache 1.0.0 → 1.0.1
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/dist/cache.js +8 -2
- package/package.json +7 -3
package/dist/cache.js
CHANGED
|
@@ -123,8 +123,14 @@ export class CacheService {
|
|
|
123
123
|
? { metadata: options.metadata }
|
|
124
124
|
: {}),
|
|
125
125
|
});
|
|
126
|
-
if (result.success
|
|
127
|
-
|
|
126
|
+
if (result.success) {
|
|
127
|
+
// The entry now carries exactly the tags of this write. Mappings
|
|
128
|
+
// left over from an earlier write would let `invalidateByTag` on a
|
|
129
|
+
// tag the entry no longer has delete the new value.
|
|
130
|
+
this.tagStore.removeKey(fullKey);
|
|
131
|
+
if (options?.tags && options.tags.length > 0)
|
|
132
|
+
await this.tagStore.add(fullKey, options.tags, this.tagScope(options));
|
|
133
|
+
}
|
|
128
134
|
return result;
|
|
129
135
|
}
|
|
130
136
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zudojs/cache",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Caching primitives, abstractions, and adapters for the Zudojs framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Oluwayemi Oyinlola",
|
|
8
|
+
"url": "https://github.com/oyinlola-tech"
|
|
9
|
+
},
|
|
6
10
|
"type": "module",
|
|
7
11
|
"main": "./dist/index.js",
|
|
8
12
|
"module": "./dist/index.js",
|
|
@@ -20,9 +24,9 @@
|
|
|
20
24
|
"!dist/.tsbuildinfo"
|
|
21
25
|
],
|
|
22
26
|
"dependencies": {
|
|
23
|
-
"@zudojs/errors": "1.0.
|
|
27
|
+
"@zudojs/errors": "1.0.1",
|
|
24
28
|
"@zudojs/types": "1.0.0",
|
|
25
|
-
"@zudojs/serialization": "1.0.
|
|
29
|
+
"@zudojs/serialization": "1.0.1"
|
|
26
30
|
},
|
|
27
31
|
"devDependencies": {
|
|
28
32
|
"typescript": "7.0.2",
|