Closed KeKs0r closed 7 years ago
I found a workaround which solves it. Just generate a static key:
server.method('getCurrentGames', getCurrentGames, {
bind: server,
cache: {
cache: 'redis',
expiresIn: 1000 * 60 * 3,
staleIn: 1000 * 60,
staleTimeout: 10000,
generateTimeout: 1000 * 5
},
generateKey: function (array) {
return 'main';
}
});
I still think its not consistent, that set allows it, but not drop.
Hi @hueniverse
I couldn't find the contribution guide and made a PR for this bug. Let me know if it requires any more detail!
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Hi, I am trying to drop a method that has no arguments.
If that is the case the id is an empty string. Which is not an issue for
policy.set
:https://github.com/hapijs/catbox/blob/master/lib/policy.js#L237-L238
But if I want to invalidate the same, I get an Error:
https://github.com/hapijs/catbox/blob/master/lib/policy.js#L257-L262
Is it possible to remove the id check?