@oxyhq/core 17.0.0 → 17.0.2
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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/server/userInvalidation.js +6 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/server/userInvalidation.js +6 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/server/__tests__/userInvalidation.test.ts +14 -2
- package/src/server/userInvalidation.ts +6 -0
|
@@ -161,6 +161,12 @@ export function createOxyUserInvalidationHandler(options = {}) {
|
|
|
161
161
|
* wrong data.
|
|
162
162
|
*/
|
|
163
163
|
export function evictOxyIdentityCache(oxy, userId) {
|
|
164
|
+
// Match the sweep the user mixin runs after a local profile write — session-
|
|
165
|
+
// bound and /users/me entries are keyed without the user id, so they must be
|
|
166
|
+
// prefix-swept on cross-service invalidation too.
|
|
167
|
+
oxy.clearCacheByPrefix('GET:/session/user/');
|
|
168
|
+
oxy.clearCacheByPrefix('GET:/users/me');
|
|
169
|
+
oxy.clearCacheByPrefix('GET:/auth/lookup/');
|
|
164
170
|
oxy.clearCacheEntry(`GET:/users/${userId}`);
|
|
165
171
|
oxy.clearCacheByPrefix('GET:/profiles/username/');
|
|
166
172
|
oxy.clearCacheByPrefix('GET:/profiles/resolve');
|