How to flush Memcached

    October 17, 2019

    How to use flush Memcached with the command line interface (CLI).

    You must have SSH access to your server in order to use this method. If you do not have SSH access, see How to enable SSH access for details.

    1. Log in to your server with SSH.

    2. Identify the location of the Memcached socket or IP/port using the configuration file of your CMS. If you require assistance locating this file or encounter difficulty with this procedure, contact our 24/7 support team by email or through your Client Portal.

    3. Flush your cache:
      • For unix-socket-based Memcached:

        echo "flush_all" | nc -U [path/to/memcachedsocket.sock]
      • For TCP-socket-based Memcached:

        echo "flush_all" | nc [memcachedhost] [memcachedport]

    For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.

    Was this article helpful?

    Send feedback

    Can’t find what you’re looking for?

    Our award-winning customer care team is here for you.

    Contact Support