Skip to content
New issue

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

flush_all not working #45

Open
briffaantoine opened this issue Aug 3, 2017 · 3 comments
Open

flush_all not working #45

briffaantoine opened this issue Aug 3, 2017 · 3 comments

Comments

@briffaantoine
Copy link

briffaantoine commented Aug 3, 2017

Hi,

I'm using this client in a lambda function on Amazon AWS.

I have an ElastiCache Memcached cluster of 2 nodes.
I'm passing these nodes to the connection. (I'm not using the auto discover feature).
The connection, set, get, delete funcionality are working fine.

However the flush functionality is not flushing the data.

memcachePlus = new MemcachePlus( { hosts: memcacheHosts } ); memcachePlus.flush().then(onFlushComplete);

No errors are thrown, but data is still there.

Scenario:
Set a key-value item.
Get by key to make sure it's inserted.
Flush data.
Get by key again which should return null, but instead returns the data.

@treble-snake
Copy link

Thing is, the library sends the command to a single connection (see here), since Memcached has no clustering mechanisms whatsoever.

While it works for get/set/del methods, flush is, obviously, a different case.

Feels like it should be explicitly sent to all the connections.

@victorquinn hey, what do you think? would you be open for a pull-request?

@victorquinn
Copy link
Owner

Ahhh good catch yeah and would totally take a PR for this 😄

@ronycohen
Copy link

hello,
Any news ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants