I have just pull a request to the github that contain some improve I made it some days ago. The stats cachedump command dump all the keys (including expired), so if just dumping the non-expired keys, it will perform better.
We have not yet used this feature in product environment, so use it on your risk~. Of course, you also can add another string type parameter to the command, and filter roughly at the cache before return to the client. Depend on you need. https://github.com/memcached/memcached/pull/79 Best regards, Jason CHAN From: [email protected] [mailto:[email protected]] On Behalf Of audric bizouarn Sent: Thursday, August 07, 2014 4:09 PM To: [email protected] Subject: Re: Remove certain items from the cache Is it possible to create multiple slabs for items of the same size? To have slabs of reasonable table. Le jeudi 7 août 2014 10:05:50 UTC+2, audric bizouarn a écrit : Hi, I changed the limitation (it is now variable) but parse the key is actually quite long (about 1 hour for a slab to 30M!) Do you have any idea what I could improve? thank you Le mercredi 6 août 2014 10:11:24 UTC+2, Zhiwei Chan a écrit : Hi, It does not matter that a slabs contain several pages, as it dump all the keys in the LRU list in the slab. But the maximum dump memory is 2M, so it is possible that not all the keys in the slab are dump. (Of course you can change this limitation in function do_item_cachedump). Another approach I heard it is that save the keys in a database when setting it to the cache. So you can easily remove keys as any pattern. That is a good idea if there are not so many keys adding and deleting operation. Hope it help u. Best regards, Jason CHAN From: [email protected] [mailto:[email protected]] On Behalf Of audric bizouarn Sent: Wednesday, August 06, 2014 3:20 PM To: [email protected] Subject: Remove certain items from the cache Hello there, There he has a method to be able to remove items from the cache using a regular expression on the key. For example we want to remove all the key as "my_key_ *?" We try to parse all the slabs with the command "stats cachedump" but our slabs contain several pages and it is impossible to recover all the elements! Thank you. -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout. -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
