Module MemCached

From Dolibarr ERP CRM Wiki
(Redirected from Module MemCached EN)
Jump to navigation Jump to search


Module name Accelerator MemCached
Editor / Editeur DoliCloud -
Download or buy page / Page achat ou téléchargement
Status / Statut / Estado Stable
Prerequisites / Prérequis Dolibarr min version 6.2   
Last update date / Date mise à jour fiche / Fecha última actualización 2021-02-24
Note / Nota


Allows Dolibarr to increase speed by using a cache server MemCached. Dolibarr use this cache to store result of redundant operation like IO used for reading language files. According to platform, speed increase can be between 20% and 40%.


To install/use this module, you must before:

  • Have a running memcached server and know its address (ex: localhost) and its port (ex: 11211). Process to install such a server is not part of this documentation. See articles found on the Internet for this. Ie:

- See for install on Windows

- See for install on Ubuntu, ...

- See for install on MacOS 10.6

  • Have functions "memcached" activated into your PHP (Go into Dolibarr menu Home -> System information -> PHP to see if at least PHP functions memcached are available).

Again, if those functions are not available, search article on the Internet to see how to setup your PHP to support memcached.


  • Download archive file of module (.zip file) from web site or from any other source.
  • Install module into the custom folder of Dolibarr:
    • Go to Home - Setup - Modules - Deploy/install external app/module
    • Upload the file. Note: If it fails, you can manually unzip the file into the custom directory from command line: Go into the *custom* directory and uncompress file with command unzip
  • Module is ready to be activated and used.


To use this module, you must first enable it using an administrator account, via the menu option "Home - Setup - Modules".

Choose the tab where the module is listed. Then click on "Activate".

The module is now activated.

If a cog icon appears Cog circle.svg on module thumb or at end of the line of the module, click on it to access the setup page specific to the module.

Module setup page:

The tab Server setup

In the server setup page, you must fill the following information:

  • Name of Memcached server: Put a DNS name or IP address of Memcached server.
  • Port or Memcached server: Put here the port of the Memcached server.

Save and that's all. Dolibarr should now use the cache server when it can.

Note: If you add the line


into file htdocs/conf/conf.php, then the 2 tabs to view statistics on cache server are removed. This is usefull for web hosting providers of Dolibarr (SaaS) to avoid users to see information (the cache content) shared by the hosted server.

The tab Server statistics

This tab show you the status of the cache and how much it is used. To have an idea of the efficiency, see the next chapter.

Memcached screenshot 1.png


This module is a technical module. As soon as setup is done, Dolibarr use the cache server when it thinks it's necessary. There is no other things to do.

The following screenshot show you a performance comparison, done with BlackFire, with and without the module. As we can see, the gain (59ms faster for a total of 152ms, so 25% faster) is mostly on the step to load the language files (already in cache, 56ms for this step in function Translate::load).

Comparison with blackfire.png


The development of this module is not included inside the standard GIT repository of Dolibarr but inside a repository dedicated to modules not supported by the Dolibarr development team but supported by DoliCloud team:

Note that the code of all modules developed by DoliCloud team are presents in the same repository (1 sub-directory of htdocs = 1 module). They are all Open Source modules.