const broker = new ServiceBroker({
cacher: {
ttl: 60,
lock: true, // Set to true to enable cache locks. Default is disabled.
}
});
But in base.js, we're checking that
ts
if (opts.lock.enabled !== false)
so just passing a boolean won't work here
and in another part, it says
const broker = new ServiceBroker({
cacher: {
ttl: 60,
lock: {
ttl: 15, // The maximum amount of time you want the resource locked in seconds
staleTime: 10, // If the TTL is less than this number, it means that the resources are staled
}
}
});
but still, there's no enabled key until we reach the third part.
On https://moleculer.services/docs/0.14/caching#Cache-locking suggests that we can use
But in base.js, we're checking that ts if (opts.lock.enabled !== false) so just passing a boolean won't work here and in another part, it says
but still, there's no enabled key until we reach the third part.