Get Free Audit

Prestashop 1.7 for Beginners: Using Memcached

Apr 5, 2017

5420 Vladislav Yunusov

Prestashop 1.7 for Beginners: Using Memcached

In order to optimize and increase performance speed of your Prestashop, you need to take care about caching. It’s really good idea to use memory object system like Memcached. So that means the certain rarely modified elements will be cached in server’s memory and can be used again whenever it’s required.

And before you enable it in your Prestashop, please make sure that your servers/hosts support it – most probably, if your PHP configuration features the Memcached PECL extension, you are good to go (you can download it here). Please take into account that installation process steps depend on the type of server you use.

So now let’s take a look at how to enable the memcached in admin panel:

Please navigate to Advanced Parameters -> Performance

Prestashop 1.7 for Beginners Using Memcached

Scroll down the page and find the Caching block. Here click to Yes, to enable caching.

Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Prestashop 1.7 for Beginners Using Memcached

Then you you’ll see suggested caching systems list, and in our case we choose “Memcached via PHP::Memcache”. After that you need to click “Add server” button to fill in 3 text boxes:

  • IP Address. The IP address where the service will be available (usually is;
  • Port. The actual port where Memcached is running (default 11211);
  • Weight. Enter “1” if you are using a single Memcached instance.

Prestashop 1.7 for Beginners Using Memcached

That’s all, just click “Add server” button (or “Test Server” to test the server out), and find this configuration in the list. Then click “Save”.

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey


  1. @lex, memcached implements much more of the protocol than the older memcache client. The most important features that memcached has are:

    • Cas tokens. This made my life much easier and is an easy preventive system for stale data. Whenever you pull something from the cache, you can receive with it a cas token (a double number). You can than use that token to save your updated object. If no one else updated the value while your thread was running, the swap will succeed. Otherwise a newer cas token was created and you are forced to reload the data and save it again with the new token.
    • Read through callbacks are the best thing since sliced bread. It has simplified much of my code.
    • getDelayed() is a nice feature that can reduce the time your script has to wait for the results to come back from the server.
    • While the memcached server is supposed to be very stable, it is not the fastest. You can use binary protocol instead of ASCII with the newer client.
    • Whenever you save complex data into memcached the client used to always do serialization of the value (which is slow), but now with memcached client you have the option of using igbinary. So far I haven’t had the chance to test how much of a performance gain this can be.
  2. Good Article,

    so we try for a webshop in prestashop to buy Jeans Urban jeans
    tried using mechache WITHOUT D;
    what’s the differtente about memcached and memcache?

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *