core: fix domain cache management

pull/532/head^2
undefined 2 years ago
parent aa044ee6d9
commit b5d51f3372
No known key found for this signature in database

@ -102,7 +102,7 @@ class DomainModel {
const result = await coll.findOneAndUpdate({ lower: domainId }, { $set }, { returnDocument: 'after' }); const result = await coll.findOneAndUpdate({ lower: domainId }, { $set }, { returnDocument: 'after' });
if (result.value) { if (result.value) {
await bus.parallel('domain/update', domainId, $set, result.value); await bus.parallel('domain/update', domainId, $set, result.value);
cache.delete(`id::${domainId}`); bus.broadcast('domain/delete-cache', domainId);
} }
return result.value; return result.value;
} }

Loading…
Cancel
Save