We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I pass a redis client I created earlier as an option the cache is always skipped.
Looking into the code the cache is always skipped when this.connected === false:
// ExpressRedisCache.js: if ( self.connected === false || self.client.connected === false ) { return next(); }
This is actually the default value, which gets updated when the 'connect' event happens:
// ExpressRedisCache/route.js: this.client.on('connect', function () { this.connected = true; this.emit('connected', { host: this.host, port: this.port }); this.emit('message', 'OK connected to redis://' + this.client.address); }.bind(this));
But since the 'connect' event happened earlier, this.connected never gets set correctly and so the cache is always skipped.
I have tested pull-request #96 in a fork and it fixes the issue, it would be great to have it merged in.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I pass a redis client I created earlier as an option the cache is always skipped.
Looking into the code the cache is always skipped when this.connected === false:
This is actually the default value, which gets updated when the 'connect' event happens:
But since the 'connect' event happened earlier, this.connected never gets set correctly and so the cache is always skipped.
I have tested pull-request #96 in a fork and it fixes the issue, it would be great to have it merged in.
The text was updated successfully, but these errors were encountered: