Memcached

Settings

↑ Back to top

The settings in this section apply to the Memcached integration of the WooCommerce Product Search extension. When enabled, the search engine can use a Memcached server or server pool to power its high-performance caching system.

You will find these settings on your WordPress dashboard, go to WooCommerce > Settings > Search > Cache > Memcached

  • Enabled – Check this box to enable the Memcached integration.
  • Host – Indicate the host or socket where the Memcached instance accepts connections. If a server pool is used, several hosts can be indicated separated by comma.
  • Port – Indicate the corresponding port (or ports separated by comma) where the Memcached instance listens for connections.
  • Username – The optional username to authenticate with the Memcached instance is provided here.
  • Password – The corresponding password for the username is provided here.

The search engine’s cache system can connect to a Memcached server or a server pool with multiple instances.

How to install Memcached

↑ Back to top

We will go through the steps to quickly install a free Memcached server.

Follow the steps below to install a Memcached server and have it running as a service on a Debian or Ubuntu host.
Update the package repository first:

$ sudo apt update

Now install the Memcached server package:

$ sudo apt install memcached

Install the PHP extension:

$ sudo apt install php-memcached

Check the server version:

$ memcached –-version

Check that the server is running as a service:

$ sudo service memcached status

This is optional but provides a few helpful tools:

$ sudo apt install libmemcached-tools

The above includes several command line tools, including memcstat which comes in handy to get some stats on the running memcached server:

$ memcstat –-servers=localhost

Once the Memcached server is running and the integration enabled in the search engine’s settings, you can use the above command to verify and look at some of the relevant stats evolve while the system is using the Memcached server.

Here we assume that the Memcached server will run on the same host as the web server. The default connection settings allow the search engine to connect to it to port 11211 on localhost. If your configuration is different, make sure to adjust the Memcached settings of the search engine accordingly.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.