3rd-Eden / memcached

A fully featured Memcached client build on top of Node.js. Build with scaling in mind so it will support Memcached clusters and consistent hashing.
MIT License
1.31k stars 276 forks source link

Get all the stored keys by memcached method in nodejs #366

Open NayOoLwin5 opened 2 years ago

NayOoLwin5 commented 2 years ago

Hi all, first of all, thanks for this amazing library.

Is there any method that memcached provides to access all stored keys? I need them to access their respective values somewhere else in my code.

anhnt2309 commented 2 years ago

https://github.com/3rd-Eden/memcached/blob/master/examples/simple_cachedump.js

You can reference this file to list all keys stored in memcached. I'd just test it and it work great

NayOoLwin5 commented 2 years ago

Thanks a lot @anhnt2309.. it does list out all stored keys but also I am getting the keys that I have deleted long back. Is there any workaround to filter only the active keys (the ones not deleted yet)?

nouritsu commented 4 months ago

@NayOoLwin5 did you find a solution to only get the current keys?