skip to Main Content

I use Memcached to store content lists with very key combinations, when user edited the content, I must refresh the cache, but it is hard to say what particular list to refresh, it is not either a good idea to flush the entire Memcached server, so my question is: Can I group the Memcached keys so that I can flush a group but the total Memcached?

2

Answers


  1. Memcached does not have support for range queries so unfortunately you cannot flush a subset of keys.

    Login or Signup to reply.
  2. Memcached does not natively support flushing of the cache group. What you could try is to group your Memcached keys in namespaces. Check the Memcached wiki for more information.

    If by any chance you’re using Spring Boot you could try the auto-configuration library for the Memcached cache. The library supports clearing out of the cache group.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search