question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing in a existing memcached client ignores the secret option

See original GitHub issue

I have a project that already has a memcached instance created, yet when adding connect-memcached, it will create a new instance of the client but i wanted to use the existing instance

Took a look at the code and i see i can pass in a client at MemcachedStore(), but for some reason in case a client is passed the secret option is ignored:

https://github.com/balor/connect-memcached/blob/5116ea30a6d15e7373de7d47cadc9fb5dd56cdf9/lib/connect-memcached.js#L32-L53

Shouldn’t the if (options.secret) block be outside the if (!options.client)?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
balorcommented, Mar 31, 2022

FYI I’m planning to add your case as a test, for this purpose I’ve migrated test “suite” from manual scripts to Jest. Next steps in progress.

1reaction
balorcommented, Apr 12, 2022

small update: working on merging this pr, which will also fix this issue along the way

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regarding setting up SASL with memcached server and ...
Yes...that's the thing I was wondering, 'no secret in database' means its able to reach the database, but unable to read/load the memcached-sasl-pwdb...
Read more >
Configuration — Beaker 1.9.0 documentation
Cache Region Options​​ This should generally be used when testing an application or in development when caching should be ignored. Defaults to True....
Read more >
Simple session middleware for Express - GitHub
Using a secret that cannot be guessed will reduce the ability to hijack a session to only guessing the session ID (as determined...
Read more >
Grafana Mimir configuration parameters
To do this, pass -config.expand-env=true on the command line and use ${VAR} , where VAR is the name of the environment variable.
Read more >
Configuration Options | Directus Docs
How to scope the cache data. Where to store the cache data. Either memory , redis , or memcache . If set, returns...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found