memcached icon indicating copy to clipboard operation
memcached copied to clipboard

Get all the stored keys by memcached method in nodejs

Open NayOoLwin5 opened this issue 2 years ago • 3 comments

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.

NayOoLwin5 avatar Jul 14 '22 14:07 NayOoLwin5

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

anhnt2309 avatar Aug 15 '22 05:08 anhnt2309

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)?

NayOoLwin5 avatar Aug 27 '22 16:08 NayOoLwin5

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

nouritsu avatar May 28 '24 09:05 nouritsu