Jump to content
JPresta.com

[Module] Page Cache - speed up your shop

Recommended Posts

1 hour ago, porrasus1 said:

I cannot be happier with this module, my test site flyes now, pls check it out ...... https://www.njoytrends.com/

But besides module being a must , to more surprising to me was the excellent support and implication with custom integration i needed form developer, i have no words to acknowledge this guy, who is gonna makes me rich :-)

My experience with other module developers support in prestashop addons is not any good, so take care mr speedy and keep developing other modules.

 

 

You might want to check your htaccess file as your site is not resolving to njoytrends.com or http://njoytrends.comhttps://njoytrends.com,

If you wish to speed up your loading times further you might want to set your SSL Domain and Shop Domain without the www. before of your hostname,

https://www.hostinger.com/tutorials/wp-content/uploads/sites/2/2017/03/prestashop3.png

Edited by nicoX (see edit history)

Share this post


Link to post
Share on other sites
5 hours ago, nicoX said:

 

You might want to check your htaccess file as your site is not resolving to njoytrends.com or http://njoytrends.comhttps://njoytrends.com,

If you wish to speed up your loading times further you might want to set your SSL Domain and Shop Domain without the www. before of your hostname,

https://www.hostinger.com/tutorials/wp-content/uploads/sites/2/2017/03/prestashop3.png

Thanks nicox i did but dont really understand why i shoould speed up things this way.

Share this post


Link to post
Share on other sites

I just upgraded the module to the new version 4.28 and now i have the problem that it mixes up cache from the normal site and the mobile site.

I am using prestashop 1.6.1.17 with default theme.

If have disabled many modules on the mobile site, dias, background changer and text boxes e.t.c but now the mobile index page shows these modules even if they are disabled for mobile. Also on the normal site text boxes from the mobile site is displayed on some of the pages.

So it does not seem to be a good idea to use the same cache for normal and mobile site as in this new version ?

What can i do to make my site look normal again ?

 

Best Regards  John

Share this post


Link to post
Share on other sites

Hi Bonjovi67 !

 

If you go to the bottom left of the version number 4.28 inside you're module, you'll find Advanced Mode. Click here and go to the Options tab. Here you will find, Create separate desktop and mobile device cache, check if enabled or not.

 

Best regards

MacRoy

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, MacRoy said:

Hi Bonjovi67 !

 

If you go to the bottom left of the version number 4.28 inside you're module, you'll find Advanced Mode. Click here and go to the Options tab. Here you will find, Create separate desktop and mobile device cache, check if enabled or not.

 

Best regards

MacRoy

That is great, thank you for the answer.

 

Best regards

John

Share this post


Link to post
Share on other sites

Hello,

I have a problem with pagecache, when the module is enabled my header is deformed (see images below).

Any idea to fix it ? I use pagecache v3.17 and presta v1.6.13

 

Thanks

without pagecache.png

with pagecache.png

Share this post


Link to post
Share on other sites

Hi Loic.

 

I reccomend you to upgrade to 4.28 on the module!

 

Best regards

MacRoy

Share this post


Link to post
Share on other sites

J'ai installer prestashop 1.7.4 pour test et il y'a une alerte avec le module page cache 4.30 quand je lance l'analyse : Une erreur s'est produite: 

Si HTTPS est configuré pour votre boutique merci de naviguer dans l'administration en utilisant HTTPS.

Pas d'inquiétude, cela n'impacte en rien la mise en cache des pages.

Le https fonctionne bien dans le back office, mais il y'a des pages blanche dans le frontoffice

J'ai installer avec prestashop 1.7.3 et j'ai pas d'erreur https et les pages web fonctionne bien avec page cache.

Edited by ritopina (see edit history)

Share this post


Link to post
Share on other sites
On 05/07/2018 at 10:15 AM, ritopina said:

J'ai installer prestashop 1.7.4 pour test et il y'a une alerte avec le module page cache 4.30 quand je lance l'analyse : Une erreur s'est produite: 

Si HTTPS est configuré pour votre boutique merci de naviguer dans l'administration en utilisant HTTPS.

Pas d'inquiétude, cela n'impacte en rien la mise en cache des pages.

Le https fonctionne bien dans le back office, mais il y'a des pages blanche dans le frontoffice

J'ai installer avec prestashop 1.7.3 et j'ai pas d'erreur https et les pages web fonctionne bien avec page cache.

Si les erreurs persistent je vous invite à me contacter via le support. Merci.

Share this post


Link to post
Share on other sites

Great module, thank you.

I am having an issue with deleting products though. The MySQL queries are taking a very long time, with the same query from PageCacheDAO.php executing 5 times, at 100+ seconds per execution. Logging the MySQL slow queries shows that one product deletion creates ~3MB in the log file.

Here is the query at question. The $url_query string ends up over 600,000 characters, which executed not once, but 5 times, takes a long time, as you can imagine. My shop has ~17k products at the moment, just to give a little context.

$query = 'SELECT DISTINCT pc.id, pc.file FROM `'._DB_PREFIX_.self::TABLE.'` AS pc
  LEFT JOIN `'._DB_PREFIX_.self::TABLE_BACKLINK.'` AS bl ON (bl.id = pc.id)
  WHERE `backlink_crc32` IN ' . $url_query . ')';

My TABLE_BACKLINK is quite large too, currently at +14M lines. The TABLE table is 74k lines.

 

PS 1.6.1.17

 

Can you help?

 

Some info from the slow_query_log_file covering one product deletion:

# Query_time: 91.175904  Lock_time: 0.045711 Rows_sent: 1  Rows_examined: 14305383

# Query_time: 100.045969  Lock_time: 0.043841 Rows_sent: 1  Rows_examined: 14305383

# Query_time: 110.333737  Lock_time: 0.044119 Rows_sent: 1  Rows_examined: 14305383

# Query_time: 109.052453  Lock_time: 0.157412 Rows_sent: 1  Rows_examined: 14305383

# Query_time: 109.088081  Lock_time: 0.095610 Rows_sent: 1  Rows_examined: 14305383

 

Edited by asapho
give a little more detail (see edit history)

Share this post


Link to post
Share on other sites
2 hours ago, asapho said:

The $url_query string ends up over 600,000 characters, which executed not once, but 5 times, takes a long time, as you can imagine.

Thank you for this analysis! Which version of PageCache do you have?

Do you know if it is exactly the same request that is executed 5 times? What change do you do to trigger this reffreshment (price change, photo, description, etc.)?

I guess your shop has a lot of links usually due to a lot of categories in a big menu, doesn't it? If so there is an advanced configuration we can setup for this kind of case.

Share this post


Link to post
Share on other sites

 

9 hours ago, JPresta.com said:

Thank you for this analysis! Which version of PageCache do you have?

Do you know if it is exactly the same request that is executed 5 times? What change do you do to trigger this reffreshment (price change, photo, description, etc.)?

I guess your shop has a lot of links usually due to a lot of categories in a big menu, doesn't it? If so there is an advanced configuration we can setup for this kind of case.

 

I currently have PageCache version v4.22.

The same exact request is firing 5 times; I compared the query strings in NetBeans and they're exactly the same.

There's only one event that I commonly do that takes an exceedingly long time, and that's deleting products; either one at a time or bulk. I.e. PS backoffice/catalog/products/select a product and delete.

My shop's essential an auto parts shop and my category size is large, with typical categories and vehicle make and model categories. Category count is currently ~2500. I also have 108k product_attributes, if that makes a difference.

Thanks!

Share this post


Link to post
Share on other sites

Hi,

I have a problem when the ajax desactivated in module cart, prestashop 1.6.1.18

quantities are not updated on pages, and cart remains empty,

but when I click and go in the cart is updated...

someone knows this problem?

Share this post


Link to post
Share on other sites
On 10/07/2018 at 8:24 PM, asapho said:

The same exact request is firing 5 times; I compared the query strings in NetBeans and they're exactly the same.

This is weird, this should not happen or only in 5 differents HTML requests... Can you contact me (via addons or jpresta.com) so I can analyse it deeper? Thank you.

Share this post


Link to post
Share on other sites
15 hours ago, tsoful said:

I have a problem when the ajax desactivated in module cart, prestashop 1.6.1.18

quantities are not updated on pages, and cart remains empty,

but when I click and go in the cart is updated...

someone knows this problem?

Hello, contact me throught the support link (depends if you bought on addons or jpresta.com) and I will have a look.

Share this post


Link to post
Share on other sites

Hello,

I installed the module on version 1.6.1.19 and it seems to not work on my homepage. I can't enable it in "page cache - infos". When I click the red switch on/off button, it remains still red. After the very first instalation stats on gtmetrix were A98 (not changed) A88 (raised from 84) and now it does A94 B83 but i am not sure due to its red unchangeable button if the module is working on the homepage.

Also the "page cache - infos" shows just sometimes, even when the showing is enabled in back office and when I enable the cache on other parts on my site it just automatically switch off.

Edited by vajdal (see edit history)

Share this post


Link to post
Share on other sites
4 hours ago, vajdal said:

I installed the module on version 1.6.1.19 and it seems to not work on my homepage. I can't enable it in "page cache - infos". When I click the red switch on/off button, it remains still red. After the very first instalation stats on gtmetrix were A98 (not changed) A88 (raised from 84) and now it does A94 B83 but i am not sure due to its red unchangeable button if the module is working on the homepage.

Also the "page cache - infos" shows just sometimes, even when the showing is enabled in back office and when I enable the cache on other parts on my site it just automatically switch off.

Try to clear the cache in Advanced parameters > Performances. Check URL parameters 'dbgpagecache', it must be equal to 1 to enable the cache.

Page Cache decreases PageSpeed / GTMetrix score in test mode because of the infos box.

For your information: The score indicated by tools like PageSpeed or GTMetrix essentially reflects the design quality of your theme. This helps to know if your site is designed to display quickly, it does not mean that your site is fast. A fast site can have a bad score and a slow site a good score because the TTFB (Time To First Byte) is not taken into account. In other words, the response time of the server does not appear in this score. You have to look at the loading time of the site; PageCache reduces the TTFB, ie the response time of the server of the first request (HTML).

Share this post


Link to post
Share on other sites

I am running version 3.17 and I'm having some issues when customers log in. After they log in and go to another page they are showing they aren't logged in, etc. I'm thinking I need to upgrade the module. Can I upgrade for a discount? Also, what is the difference between standard and ultimate?

Will you help me with my issues once I install the newest version to make sure everything is running properly?

Thanks!

Alex

Share this post


Link to post
Share on other sites

Hi,

 

I just updated to version 4.28 (PS 1.6.1.17). We had some issues with the older version in Multistore.

For some reason the sliders for Pages&Timeouts won't display.

I have to fill in something, but any number (except 0) breaks my website.

 

Any idea how to solve this?

 

Regards,

 

Christiaan

pagecache.jpg

Share this post


Link to post
Share on other sites

Why when deleting the prestashop cache and page cache using "Clear cache" in database there is only `ps_jm_pagecache_mods` cleared but `ps_jm_pagecache` is not cleared? I have like 100 000 entries there. 

Can I delete it manualy when deleting default cache? Or Can You tell me which function exactly is doing this?

Edited by hakeryk2 (see edit history)

Share this post


Link to post
Share on other sites
On 08/08/2018 at 2:41 PM, hakeryk2 said:

Why when deleting the prestashop cache and page cache using "Clear cache" in database there is only `ps_jm_pagecache_mods` cleared but `ps_jm_pagecache` is not cleared? I have like 100 000 entries there. 

Can I delete it manualy when deleting default cache? Or Can You tell me which function exactly is doing this?

I'm back from vacation, thank you for your patience.

This table is used for stats. It will be cleared when you clear statistics in Page Cache configuration page > Stats tab.

  • Like 1

Share this post


Link to post
Share on other sites
On 07/08/2018 at 6:10 PM, Christiaan_01 said:

I just updated to version 4.28 (PS 1.6.1.17). We had some issues with the older version in Multistore.

For some reason the sliders for Pages&Timeouts won't display.

I have to fill in something, but any number (except 0) breaks my website.

 

Any idea how to solve this?

Try to clear Prestashop cache and also your browser cache (template and JS have been changed)

Share this post


Link to post
Share on other sites
17 hours ago, JPresta.com said:

Try to clear Prestashop cache and also your browser cache (template and JS have been changed)

Hi JPresta,

 

Thanks for helping, but unfortunately it doesn't change the issue.

 

The console gives this error:

ReferenceError: Slider is not defined[Meer info] index.php:4039:13

 

 
Edited by Christiaan_01 (see edit history)

Share this post


Link to post
Share on other sites
53 minutes ago, Christiaan_01 said:

Thanks for helping, but unfortunately it doesn't change the issue.

Can you contact me (via addons or jpresta.com) so I can analyse it ?

Share this post


Link to post
Share on other sites
On 7/12/2018 at 8:45 AM, JPresta.com said:

This is weird, this should not happen or only in 5 differents HTML requests... Can you contact me (via addons or jpresta.com) so I can analyse it deeper? Thank you.

 

I apologize for the delayed reply!

I figured it out after understanding how function PageCacheDAO::clearCacheOfObject is called and operates. I had modified the $query SELECT string to clear specific cache objects via CRON and was inadvertently delete all cache when the function was called by pagecache:: with $id_object = NULL.

Oops. My fault, not yours.

Share this post


Link to post
Share on other sites
1 hour ago, YourObsession said:

Hello. After installing the module, I have a problem with the cookie and AgeVeryfi modules. https://mypresta.eu/pl/modules/funkcjonalnosci-sklepu/europejskie-prawo-cookies.html https://addons.prestashop.com/en/website-security-access/19208-ageverify.html. Modules are constantly displayed on every page of the store.

Can you contact me (via addons or jpresta.com) so I can analyse it ?

Share this post


Link to post
Share on other sites

Hi,

 

I got a problem with the module (Page Cache Ultimate, last version 4.2.8). I have a multistore with a condition that redirect non-logged users to authentification page (you need to be logged-in in order to see the shop).

It's working fine, however when I enable the module, users are redirected all the times, even if they are logged-in. It seems that the condition "$this->context->customer->isLogged()" is not working properly in Classes/Controller/FrontController.php when the module is enabled.

 

Here is the condition used:

 

pb.png

Share this post


Link to post
Share on other sites
22 hours ago, Vincent Nguyen said:

I got a problem with the module (Page Cache Ultimate, last version 4.2.8). I have a multistore with a condition that redirect non-logged users to authentification page (you need to be logged-in in order to see the shop).

It's working fine, however when I enable the module, users are redirected all the times, even if they are logged-in. It seems that the condition "$this->context->customer->isLogged()" is not working properly in Classes/Controller/FrontController.php when the module is enabled.

To be compatible with Page Cache, this kind of redirection should be done by a module in actionDispatcher hook and the position in the hook should be before Page Cache. When Page Cache displays the page it removes all customer information in actionDispatcher that's why it is always redirected.

Share this post


Link to post
Share on other sites

Hi,

 I'd like to buy this addon module but before I buy I'd like to ask a few question :

 

1. Is it compatible with warehouse theme?

2. Does it support the custom Prestashop frontpage module that comes with warehouse theme.

3. Does it support special price for different customer group? Because I have different price for different 

customer group would this module allow dynamic info (eg. price for different group) base on their customer

group?

 

Edited by Deddy
Wrong Spelling / typo.. and more explanation (see edit history)

Share this post


Link to post
Share on other sites
6 hours ago, Deddy said:

1. Is it compatible with warehouse theme?

2. Does it support the custom Prestashop frontpage module that comes with warehouse theme.

3. Does it support special price for different customer group? Because I have different price for different 

customer group would this module allow dynamic info (eg. price for different group) base on their customer

group?

1) Yes it is

2) Don't know which module you are talking about but if it is delivered with warehouse theme then it should be compatible

3) Yes, a different cache is done for each customer group

Share this post


Link to post
Share on other sites

Hi, 

I bought the module today......I immediately saw significant improvements in speed .... and I really thank the developer!
But I have a problem: inserting products in the cart when I go in the product categories pages the cart is not updated but remains with 0 products.
On other pages (Product pages, Home Page) instead I see it correctly updated.
How can I solve?
Another request: I tried to do a test with GTmetrix and give me this info (attached image) about the Caching Browser ..... is it possible to do something with the module?

Thank you very much for the help!

Schermata 2018-10-14 alle 23.26.46.png

Share this post


Link to post
Share on other sites
17 ore fa, bssolutions dice:

Hi, 

I bought the module today......I immediately saw significant improvements in speed .... and I really thank the developer!
But I have a problem: inserting products in the cart when I go in the product categories pages the cart is not updated but remains with 0 products.
On other pages (Product pages, Home Page) instead I see it correctly updated.
How can I solve?
Another request: I tried to do a test with GTmetrix and give me this info (attached image) about the Caching Browser ..... is it possible to do something with the module?

Thank you very much for the help!

Schermata 2018-10-14 alle 23.26.46.png

additional information --> I'm using Prestashop 1.7.4.2 and my theme is Aeonmarket Theme (bought in PS Addons)

These are my settings on the "Performance" page
I am not using PS smarty cache because of a problem of displaying the Vertical Menu of the theme (I await solution from the developer of the theme)

Schermata 2018-10-15 alle 17.10.11.png

Share this post


Link to post
Share on other sites
On 14/10/2018 at 11:52 PM, bssolutions said:

Hi, 

I bought the module today......I immediately saw significant improvements in speed .... and I really thank the developer!
But I have a problem: inserting products in the cart when I go in the product categories pages the cart is not updated but remains with 0 products.
On other pages (Product pages, Home Page) instead I see it correctly updated.
How can I solve?
Another request: I tried to do a test with GTmetrix and give me this info (attached image) about the Caching Browser ..... is it possible to do something with the module?

Thank you very much for the help!

Schermata 2018-10-14 alle 23.26.46.png

For the problem with cart you can contact me via the support, I will analyse it.

For GTMetrix, the first one is not an error, this request cannot be cached (may Prestashop could explicitily set 'no cache'). Other requests are externals (Facebook, Google, etc) so you cannot do anything for that.

Share this post


Link to post
Share on other sites

Why don't you add a pre-cache feature to cache automatically all the page of the website?

That would be a very usefull feature to be used combined with clear cache cron. In this way It will be possible to set up 2 cron that clear and regenerate new cache, so user no need to way for slow not cached page.

Share this post


Link to post
Share on other sites
17 hours ago, DARKF3D3 said:

Why don't you add a pre-cache feature to cache automatically all the page of the website?

That would be a very usefull feature to be used combined with clear cache cron. In this way It will be possible to set up 2 cron that clear and regenerate new cache, so user no need to way for slow not cached page.

This kind of feature takes too many time to be done with PHP, the script would be stopped by the server, that's why I recommend to use wget to do it.

Share this post


Link to post
Share on other sites
16 hours ago, DARKF3D3 said:

Thank you Kpresta, do you have a guide on how this can be be done using wget?

Here is a command you can use (change values depending on your site:

wget -r -D www.yourshop.com -l3 -P temp -x -R "*cart*","*order*","*yourtheme*" -nd --delete-after --output-file=log.txt --no-verbose https://www.yourshop.com --no-check-certificate

 

Share this post


Link to post
Share on other sites

That command it's used only to add all pages to cache or it's used also to clear cache?

I have to replace 2 "yourshop.com" with my shop url? It's correct that the first one has only www and the second one also https://?

Share this post


Link to post
Share on other sites
On 25/10/2018 at 11:25 PM, DARKF3D3 said:

That command it's used only to add all pages to cache or it's used also to clear cache?

I have to replace 2 "yourshop.com" with my shop url? It's correct that the first one has only www and the second one also https://?

Yes, the first one defines the domain, the second one the URL to browse. You should also change 'yourtheme' value with the name of your theme (ex: warehouse).

It only browses the site so to clear the cache you must call the CRON URL before.

Share this post


Link to post
Share on other sites

Thank you.

Where can be found log.txt created by this script?

this script will only find pages linked from other pages of the website starting from home? So for example if there's some pages that have no link to it this page will not be opened?

I'm wondering this because on my website there's some OOS products no more showed on categories, and the only way to find them it's using direct link, but there are some user arriving on these products from search engine, so that would be a good thing to cache also these pages. There's a way to do this?

Share this post


Link to post
Share on other sites
8 hours ago, DARKF3D3 said:

Where can be found log.txt created by this script?

this script will only find pages linked from other pages of the website starting from home? So for example if there's some pages that have no link to it this page will not be opened?

I'm wondering this because on my website there's some OOS products no more showed on categories, and the only way to find them it's using direct link, but there are some user arriving on these products from search engine, so that would be a good thing to cache also these pages. There's a way to do this?

log.txt is in the directory from which you ran the script

That's true, if a page is not linked by other pages then it is not cached. The only way would be to generate a list of OOS products and give it to wget (don't ask me how to generate this list ;-)).

 

Share this post


Link to post
Share on other sites

I would like to start the module from the beginning. I want to clear all the cache files from the server, but I can not do this from the settings in the module. Files are not deleted from the server. I press the "Clear cache" button, but the files on the server are getting more and more. How can I delete all the files created by the module and start from the beginning?

I'm talking about files on screenshot below. 

2018-11-21_09-43-49.png

Share this post


Link to post
Share on other sites
2 hours ago, Lupus21 said:

I would like to start the module from the beginning. I want to clear all the cache files from the server, but I can not do this from the settings in the module. Files are not deleted from the server. I press the "Clear cache" button, but the files on the server are getting more and more. How can I delete all the files created by the module and start from the beginning?

I'm talking about files on screenshot below. 

2018-11-21_09-43-49.png

Page Cache only creates files under /cache/pagecache, when you clear the cache it is deleted.

cache-- and cache--- are probably backups and will never be cleared (except manualy), img is the directory where images of products (and others) are stored, it will not be clear with cache.

Normally, clearing the cache from the Performance page should be enought.

Share this post


Link to post
Share on other sites

Hi,

I have Prestashop 1.7.5 and PageCache v4.57.  The current issue I have is the header is incorrectly showing the logged in user or the sign in link when a member is logged out or logged in. Also, when a user is logged in, she should see product prices on the home page (via the "verifycustomer" module).  However, when a user is not logged in, the user should not see product prices.  I currently have checked the "verifycustomer" module, another "combinationsincatalog" module, "My Account block", "Shopping Cart", AT - Featured Products, Customer "Sign in" link checkboxes all checked on the DYNAMIC MODULES AND WIDGETS tab.  

How can I troubleshoot this? Or can you help me fix this issue?  When I disable PageCache, everything works properly.

Thanks,

John

Share this post


Link to post
Share on other sites
18 minutes ago, fredtheplant said:

I have Prestashop 1.7.5 and PageCache v4.57.  The current issue I have is the header is incorrectly showing the logged in user or the sign in link when a member is logged out or logged in. Also, when a user is logged in, she should see product prices on the home page (via the "verifycustomer" module).  However, when a user is not logged in, the user should not see product prices.  I currently have checked the "verifycustomer" module, another "combinationsincatalog" module, "My Account block", "Shopping Cart", AT - Featured Products, Customer "Sign in" link checkboxes all checked on the DYNAMIC MODULES AND WIDGETS tab.  

How can I troubleshoot this? Or can you help me fix this issue?  When I disable PageCache, everything works properly.

I saw your request support, I'm going to analyse this. It's probably some configuration to setup.

Share this post


Link to post
Share on other sites

Hello !

On Prestashop 1.7, what settings do we have to turn on or off in the "performance" tab, with the module activated?

Share this post


Link to post
Share on other sites
10 hours ago, sunnmagic said:

On Prestashop 1.7, what settings do we have to turn on or off in the "performance" tab, with the module activated?

The same as without Page Cache: keep smarty cache enabled, CSS and JS compress, Apache optimisations. You can also use a cache (at the bottom of the Performance page) if it's faster (sometimes it's not).

Share this post


Link to post
Share on other sites

Hi @JPresta.com

Do you know if your modolue is compatible with this theme https://addons.prestashop.com/es/temas-moda-calzado/30369-resolution-fashion-store.html?

I have this theme in my PS and i want your module, but in my country it is very expensive so I want to be sure it's going to work.

If I buy it and it does not work, can I return the money?

Best!

Share this post


Link to post
Share on other sites
On 2/12/2019 at 7:26 AM, JPresta.com said:

The same as without Page Cache: keep smarty cache enabled, CSS and JS compress, Apache optimisations. You can also use a cache (at the bottom of the Performance page) if it's faster (sometimes it's not).

Or use mod_pagespeed from Google :)

Share this post


Link to post
Share on other sites

Bonjour,

On a acheté, installé et configuré le module PageCache Ultimate sur notre site (qui tourne sous Prestashop v1.6.1.5) car notre note sur PageSpeed Insights, pour notre principale page catégorie, était catastrophique (aux alentours de 45).

Dans les recommandations de PageSpeed Insights (Google), il y avait notamment :

- Réduisez les délais de réponse du serveur (TTFB) (de 1,81 s)

Diffusez des éléments statiques grâce à des règles de cache efficaces

(Pour le moment, nous sommes très déçus car) Les problèmes, c'est que même après avoir installé et configuré le module PageCache Ultimate, sur PageSpeed Insights ... :

- Notre note/score n'a pas changée

- Les recommandations sont les mêmes

Comment faire pour améliorer cette note, réduire le TTFB et mettre en place des règles de cache efficaces ?

Merci par avance pour votre aide.

-------------

Hello,

We bought, installed and configured the PageCache Ultimate module on our site (which runs on Prestashop v1.6.1.5) because our rating on PageSpeed Insights, for our main category page, was catastrophic (around 45).

In the recommendations of PageSpeed Insights (Google), there were:

- Reduce server response times (TTFB) (from 1.81 s)

- Stream static elements with effective cache rules

(At the moment, we are very disappointed because) The problem is that even after installing and configuring the PageCache Ultimate module, on PageSpeed Insights ...:

- Our score / score did not change

- The recommendations are the same

How to improve this rating, reduce the TTFB and put in place effective cache rules?

Thank you in advance for your help.

Share this post


Link to post
Share on other sites
On 3/27/2019 at 5:13 PM, wikao said:

We bought, installed and configured the PageCache Ultimate module on our site (which runs on Prestashop v1.6.1.5) because our rating on PageSpeed Insights, for our main category page, was catastrophic (around 45).

In the recommendations of PageSpeed Insights (Google), there were:
- Reduce server response times (TTFB) (from 1.81 s)
- Stream static elements with effective cache rules

(At the moment, we are very disappointed because) The problem is that even after installing and configuring the PageCache Ultimate module, on PageSpeed Insights ...:
- Our score / score did not change
- The recommendations are the same

How to improve this rating, reduce the TTFB and put in place effective cache rules?

Page Cache should reduce your TTFB, if not there may be a problem (ask for support if needed).

To add cache directives for static elements you must enable "Apache optimisation" in Performance page of Prestashop.

Share this post


Link to post
Share on other sites

bonjour,

nous avons un soucis sur le cache ultimate :

le client ne reste pas connecté quand on active le cache pour les utilisateurs connecté,

Nous avons bien mis en dynamic les modules relatives au client mais rien n'y fait,

Pouvez vous nous apporter un élément de réponse ?

Share this post


Link to post
Share on other sites
Il y a 2 heures, JPresta.com a dit :

To add cache directives for static elements you must enable "Apache optimisation" in Performance page of Prestashop. 

That's what we did, but without success.

How can we ask for support?

Share this post


Link to post
Share on other sites
1 hour ago, VapInfo said:

bonjour,

nous avons un soucis sur le cache ultimate :

le client ne reste pas connecté quand on active le cache pour les utilisateurs connecté,

Nous avons bien mis en dynamic les modules relatives au client mais rien n'y fait,

Pouvez vous nous apporter un élément de réponse ?

Demandez ici, je vais regarder ça.

Share this post


Link to post
Share on other sites
31 minutes ago, JPresta.com said:

Demandez ici, je vais regarder ça.

a priori cela a déjà été fait par une collègue,

Merci de votre réponse en attente d'une réponse et d'une solution rapide pour notre site,

 

 

Share this post


Link to post
Share on other sites

We added AMP site and are wondering if these pages also can be cached by our Page cache module?
 

Share this post


Link to post
Share on other sites
7 minutes ago, peter4661 said:

We added AMP site and are wondering if these pages also can be cached by our Page cache module?

If those pages are generated by a module then you will not be able to cache them with Page Cache. If they belong to classical theme/template system then yes, they should be cached but I never tested this.

Share this post


Link to post
Share on other sites

Thank you for your time.

We are on Prestashop 1.7.5.1 classic theme.  
Compared AMP page loading speed ( 1.7 sec)  and cached desktop page (3.1 sec) on Webpagetest.org. 

AMP page is faster, not sure it is cached. 

https://www.derks-wielersport.nl/amp/kettingen/11778-kmc-ketting-11-speed-x11el-silver-nieuw-4715575890258.html
https://www.derks-wielersport.nl/kettingen/kmc-ketting-11-speed-x11el-silver-nieuw.html

Share this post


Link to post
Share on other sites

Hello, I had to reinstall the cache module and I don't remember how to let it work correctly with uecookie law module boguth at MyPresta.eu.

On the module there's a link at this guide, but there's no explaination on what to do.

https://jpresta.com/en/blog/faq/my-cookie-law-banner-module-always-display

PS: Do you have a complete changelog from v4.44 (the one i'm using) and 4.58?

Edited by DARKF3D3 (see edit history)

Share this post


Link to post
Share on other sites
On 4/27/2019 at 4:30 PM, DARKF3D3 said:

Hello, I had to reinstall the cache module and I don't remember how to let it work correctly with uecookie law module boguth at MyPresta.eu.

On the module there's a link at this guide, but there's no explaination on what to do.

https://jpresta.com/en/blog/faq/my-cookie-law-banner-module-always-display

PS: Do you have a complete changelog from v4.44 (the one i'm using) and 4.58?

I updated the ChangeLogs on the first post of this thread: https://www.prestashop.com/forums/topic/281654-module-page-cache-speed-up-your-shop/

If you need more help please contact me via the support.

Share this post


Link to post
Share on other sites
19 hours ago, Idroclic said:

i bought now this module but i have a problem with my cart.. The quantity of the cart has restore to 0 at the refresh of page.. How i can fix it?

Make sure you ran the auto-configuration (at least the first time you installed the module). If you need more help please contact me via the support.

Share this post


Link to post
Share on other sites

Greatting

Order #AXZRWPOKS
I can't download the new version of the module. Why?

With prestashop modules i can download forever the new version of the module.
We was migrate to prestashop 1.7 and the version that i have dont work in prestashop 1.7
Please let me download the module to the new version of prestashop.

Thank you
Best Rigards

Jorge Torres

Screenshot_14.jpg

Share this post


Link to post
Share on other sites
1 minute ago, samator79 said:

I can't download the new version of the module. Why?

With prestashop modules i can download forever the new version of the module.
We was migrate to prestashop 1.7 and the version that i have dont work in prestashop 1.7
Please let me download the module to the new version of prestashop.

I replied to you by email. If someone know a good module to manage digital sales I'm interested 🙂

Share this post


Link to post
Share on other sites
Cita

I replied to you by email. If someone know a good module to manage digital sales I'm interested 🙂

I have not received an answer yet, I thank you for answering my question.

Edited by samator79 (see edit history)

Share this post


Link to post
Share on other sites
On 5/11/2019 at 9:53 AM, samator79 said:

I have not received an answer yet, I thank you for answering my question.

On may 8th, 11:37am telling you that you can download it from your jpresta account (I enabled a last download)

Share this post


Link to post
Share on other sites
hace 21 horas, JPresta.com dijo:

On may 8th, 11:37am telling you that you can download it from your jpresta account (I enabled a last download)

Hi

Sorry but i have prestashop 1.7 and i cant download this version only for prestashop 1.6,

Thank for active only the version for prestashop 1.7.

Share this post


Link to post
Share on other sites

On 8/5/19 I updated this module to v. 4.58. Since that time I am getting 500 server errors after checkout (thread). Here's the error message with PS in debug mode:

[PrestaShopException]

Invalid product vars
at line 106 in file classes/Link.php

101.             if (is_array($product) && isset($product['id_product'])) {
102.                 $product = new Product($product['id_product'], false, $id_lang, $id_shop);
103.             } elseif ((int)$product) {
104.                 $product = new Product((int)$product, false, $id_lang, $id_shop);
105.             } else {
106.                 throw new PrestaShopException('Invalid product vars');
107.             }
108.         }
109. 
110.         // Set available keywords
111.         $params = array();

    LinkCore->getProductLink - [line 1276 - modules/blockshopreviews/blockshopreviews.php] - [8 Arguments]
    blockshopreviews->collectOrdersForShopReviews - [line 1188 - modules/blockshopreviews/blockshopreviews.php] - [1 Arguments]
    blockshopreviews->hookOrderConfirmation - [line 402 - override/classes/Hook.php] - [1 Arguments]
    Hook::exec_16 - [line 222 - override/classes/Hook.php] - [7 Arguments]
    Hook::exec - [line 143 - controllers/front/OrderConfirmationController.php] - [2 Arguments]
    OrderConfirmationControllerCore->displayOrderConfirmation - [line 87 - controllers/front/OrderConfirmationController.php]
    OrderConfirmationControllerCore->initContent - [line 189 - classes/controller/Controller.php]
    ControllerCore->run - [line 549 - override/classes/Dispatcher.php]
    Dispatcher->dispatch_16 - [line 321 - override/classes/Dispatcher.php]
    Dispatcher->dispatch - [line 28 - index.php]

It was suggested that one of the over-rides could be the cause, in my case override/classes/Hook.php or override/classes/Dispatcher.php. Looking at Hook.php, this file was modified on the same day as I updated at the same time as I updated the Page Cache module. Here's the contents of Hook.php (there are several entries related to Page Cache):

<?php
class Hook extends HookCore
{
    /*
    * module: lgcookieslaw
    * date: 2018-05-07 17:28:25
    * version: 1.4.13
    */
    public static function getHookModuleExecList($hook_name = null)
    {
        $context = Context::getContext();
        $cache_id  = 'hook_module_exec_list_';
        $cache_id .= isset($context->shop->id) ? '_'.$context->shop->id : '';
        $cache_id .= isset($context->customer) ? '_'.$context->customer->id : '';
        if (!Cache::isStored($cache_id) || $hook_name == 'displayPayment' || $hook_name == 'displayBackOfficeHeader') {
            $frontend = true;
            $groups = array();
            $use_groups = Group::isFeatureActive();
            if (isset($context->employee)) {
                $frontend = false;
            } else {
                if ($use_groups) {
                    if (isset($context->customer) && $context->customer->isLogged()) {
                        $groups = $context->customer->getGroups();
                    } elseif (isset($context->customer) && $context->customer->isLogged(true)) {
                        $groups = array((int)Configuration::get('PS_GUEST_GROUP'));
                    } else {
                        $groups = array((int)Configuration::get('PS_UNIDENTIFIED_GROUP'));
                    }
                }
            }
            if (Module::isInstalled('lgcookieslaw') && Module::isEnabled('lgcookieslaw')) {
                $cookieslaw = null;
                $cookieslaw = Db::getInstance()->executeS(
                    'SELECT id_module '.
                    'FROM '._DB_PREFIX_.'lgcookieslaw;'
                );
                if (!is_null($cookieslaw) && !empty($cookieslaw)) {
                    $modules = array();
                    foreach ($cookieslaw as $module) {
                        $modules[] = $module['id_module'];
                    }
                    $cookieslaw = $modules;
                    unset($modules);
                }
            }
            $sql = new DbQuery();
            $sql->select('h.`name` as hook, m.`id_module`, h.`id_hook`, m.`name` as module, h.`live_edit`');
            $sql->from('module', 'm');
            if ($hook_name != 'displayBackOfficeHeader') {
                $sql->join(
                    Shop::addSqlAssociation(
                        'module',
                        'm',
                        true,
                        'module_shop.enable_device & '.(int)Context::getContext()->getDevice()
                    )
                );
                $sql->innerJoin('module_shop', 'ms', 'ms.`id_module` = m.`id_module`');
            }
            $sql->innerJoin('hook_module', 'hm', 'hm.`id_module` = m.`id_module`');
            $sql->innerJoin('hook', 'h', 'hm.`id_hook` = h.`id_hook`');
            if ($hook_name != 'displayPayment') {
                $sql->where('h.name != "displayPayment"');
            } elseif ($frontend) {
                if (Validate::isLoadedObject($context->country)) {
                    $sql->where(
                        '(h.name = "displayPayment" AND ('.
                        'SELECT id_country FROM '._DB_PREFIX_.'module_country mc '.
                        'WHERE mc.id_module = m.id_module '.
                        'AND id_country = '.(int)$context->country->id.' '.
                        'AND id_shop = '.(int)$context->shop->id.' LIMIT 1'.
                        ') = '.(int)$context->country->id.')'
                    );
                }
                if (Validate::isLoadedObject($context->currency)) {
                    $sql->where(
                        '(h.name = "displayPayment" AND ('.
                        'SELECT id_currency FROM '._DB_PREFIX_.'module_currency mcr '.
                        'WHERE mcr.id_module = m.id_module '.
                        'AND id_currency IN ('.(int)$context->currency->id.', -1, -2) LIMIT 1'.
                        ') IN ('.(int)$context->currency->id.', -1, -2))'
                    );
                }
            }
            if (Validate::isLoadedObject($context->shop)) {
                $sql->where('hm.id_shop = '.(int)$context->shop->id);
            }
            if ($frontend) {
                if ($use_groups) {
                    $sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`');
                    if (Validate::isLoadedObject($context->shop)) {
                        $sql->where(
                            'mg.id_shop = '.((int)$context->shop->id).(count($groups)
                            ? ' AND  mg.`id_group` IN ('.implode(', ', $groups).')' : '')
                        );
                    } elseif (count($groups)) {
                        $sql->where('mg.`id_group` IN ('.implode(', ', $groups).')');
                    }
                }
            }
            $sql->groupBy('hm.id_hook, hm.id_module');
            $sql->orderBy('hm.`position`');
            $list = array();
            if ($result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) {
                foreach ($result as $row) {
                    $row['hook'] = Tools::strtolower($row['hook']);
                    if (!isset($list[$row['hook']])) {
                        $list[$row['hook']] = array();
                    }
                    if (Module::isInstalled('lgcookieslaw') && Module::isEnabled('lgcookieslaw')) {
                        if (Tools::getValue('controller') == 'cms'
                            && Tools::getValue('id_cms', 0) == (int)Configuration::get('PS_LGCOOKIES_CMS')
                        ) {
                            $cms_page = true;
                        } else {
                            $cms_page = false;
                        }
                        if (!Configuration::get('PS_LGCOOKIES_TESTMODE') == 1 || $cms_page) {
                            if (!isset($_COOKIE[Configuration::get('PS_LGCOOKIES_NAME')]) || $cms_page) {
                                if (!isset($cookieslaw)
                                    || is_null($cookieslaw)
                                    || empty($cookieslaw)
                                    || !in_array($row['id_module'], $cookieslaw)
                                ) {
                                    $list[$row['hook']][] = array(
                                        'id_hook' => $row['id_hook'],
                                        'module' => $row['module'],
                                        'id_module' => $row['id_module'],
                                        'live_edit' => $row['live_edit'],
                                    );
                                }
                            } else {
                                $list[$row['hook']][] = array(
                                    'id_hook' => $row['id_hook'],
                                    'module' => $row['module'],
                                    'id_module' => $row['id_module'],
                                    'live_edit' => $row['live_edit'],
                                );
                            }
                        } else {
                            $list[$row['hook']][] = array(
                                'id_hook' => $row['id_hook'],
                                'module' => $row['module'],
                                'id_module' => $row['id_module'],
                                'live_edit' => $row['live_edit'],
                            );
                        }
                    } else {
                        $list[$row['hook']][] = array(
                            'id_hook' => $row['id_hook'],
                            'module' => $row['module'],
                            'id_module' => $row['id_module'],
                            'live_edit' => $row['live_edit'],
                        );
                    }
                }
            }
            if ($hook_name != 'displayPayment' && $hook_name != 'displayBackOfficeHeader') {
                Cache::store($cache_id, $list);
                self::$_hook_modules_cache_exec = $list;
            }
        } else {
            $list = Cache::retrieve($cache_id);
        }
        if ($hook_name) {
            $retro_hook_name = Tools::strtolower(Hook::getRetroHookName($hook_name));
            $hook_name = Tools::strtolower($hook_name);
            $return = array();
            $inserted_modules = array();
            if (isset($list[$hook_name])) {
                $return = $list[$hook_name];
            }
            foreach ($return as $module) {
                $inserted_modules[] = $module['id_module'];
            }
            if (isset($list[$retro_hook_name])) {
                foreach ($list[$retro_hook_name] as $retro_module_call) {
                    if (!in_array($retro_module_call['id_module'], $inserted_modules)) {
                        $return[] = $retro_module_call;
                    }
                }
            }
            return (count($return) > 0 ? $return : false);
        } else {
            return $list;
        }
    }
    /*
    * module: pagecache
    * date: 2019-05-08 11:00:19
    * version: 4.58
    */
    private static $_is_page_cache_active = -1;
    /*
    * module: pagecache
    * date: 2019-05-08 11:00:19
    * version: 4.58
    */
    private static function _isPageCacheActive()
    {
        if (self::$_is_page_cache_active == -1)
        {
            if (file_exists(dirname(__FILE__).'/../../modules/pagecache/pagecache.php'))
            {
                require_once(dirname(__FILE__).'/../../modules/pagecache/pagecache.php');
                self::$_is_page_cache_active = Module::isEnabled('pagecache');
            } else {
                return false;
            }
        }
        return self::$_is_page_cache_active;
    }
    /*
    * module: pagecache
    * date: 2019-05-08 11:00:19
    * version: 4.58
    */
    public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = null)
    {
        if (Tools::version_compare(_PS_VERSION_,'1.6','>=')) {
            return self::exec_16($hook_name, $hook_args, $id_module, $array_return, $check_exceptions, $use_push, $id_shop);
        } else {
            return self::exec_15($hook_name, $hook_args, $id_module, $array_return, $check_exceptions);
        }
    }
    /*
    * module: pagecache
    * date: 2019-05-08 11:00:19
    * version: 4.58
    */
    private static function exec_15($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true)
    {
        if (Tools::getIsset('ajax') || strcmp('moduleRoutes', $hook_name) == 0 || !self::_isPageCacheActive()) {
            return parent::exec($hook_name, $hook_args, $id_module, $array_return, $check_exceptions);
        }
        if (($id_module && !is_numeric($id_module)) || !Validate::isHookName($hook_name))
            throw new PrestaShopException('Invalid id_module or hook_name');
        if (!$module_list = Hook::getHookModuleExecList($hook_name))
            return '';
        if (!$id_hook = Hook::getIdByName($hook_name))
            return false;
        Hook::$executed_hooks[$id_hook] = $hook_name;
        $live_edit = false;
        $context = Context::getContext();
        if (!isset($hook_args['cookie']) || !$hook_args['cookie'])
            $hook_args['cookie'] = $context->cookie;
        if (!isset($hook_args['cart']) || !$hook_args['cart'])
            $hook_args['cart'] = $context->cart;
        $retro_hook_name = Hook::getRetroHookName($hook_name);
        $altern = 0;
        $output = '';
        foreach ($module_list as $array)
        {
            if ($id_module && $id_module != $array['id_module'])
                continue;
            if (!($moduleInstance = Module::getInstanceByName($array['module'])))
                continue;
            if ($check_exceptions)
            {
                $exceptions = $moduleInstance->getExceptions($array['id_hook']);
                $controller = Dispatcher::getInstance()->getController();
                if (in_array($controller, $exceptions))
                    continue;
                $matching_name = array(
                    'authentication' => 'auth',
                    'compare' => 'products-comparison',
                );
                if (isset($matching_name[$controller]) && in_array($matching_name[$controller], $exceptions))
                    continue;
                if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))
                    continue;
            }
            if (!self::_isPageCacheActive() || PageCache::preHook($output, PageCache::HOOK_TYPE_MODULE, $moduleInstance, $hook_name, $hook_args)) {
            $hook_callable = is_callable(array($moduleInstance, 'hook'.$hook_name));
            $hook_retro_callable = is_callable(array($moduleInstance, 'hook'.$retro_hook_name));
            if (($hook_callable || $hook_retro_callable) && Module::preCall($moduleInstance->name))
            {
                $hook_args['altern'] = ++$altern;
                if ($hook_callable)
                    $display = $moduleInstance->{'hook'.$hook_name}($hook_args);
                elseif ($hook_retro_callable)
                    $display = $moduleInstance->{'hook'.$retro_hook_name}($hook_args);
                if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad') && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'.(int)Tab::getIdFromClassName('AdminModulesPositions').(int)Tools::getValue('id_employee')))
                {
                    $live_edit = true;
                    $output .= self::wrapLiveEdit($display, $moduleInstance, $array['id_hook']);
                }
                elseif ($array_return) {
                    $output = is_array($output) ? $output : array();
                    $output[] = $display;
                }
                else {
                    $output .= $display;
                }
            }
            }
            if (self::_isPageCacheActive()) {
                PageCache::postHook($output, PageCache::HOOK_TYPE_MODULE, $moduleInstance, $hook_name);
            }
        }
        if ($array_return)
            return $output;
        else
            return ($live_edit ? '<script type="text/javascript">hooks_list.push(\''.$hook_name.'\');</script>
                <div id="'.$hook_name.'" class="dndHook" style="min-height:50px">' : '').$output.($live_edit ? '</div>' : '');// Return html string
    }
    /*
    * module: pagecache
    * date: 2019-05-08 11:00:19
    * version: 4.58
    */
    private static function exec_16($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = null)
    {
        if (Tools::getIsset('ajax') || strcmp('moduleRoutes', $hook_name) == 0 || !self::_isPageCacheActive()) {
            return parent::exec($hook_name, $hook_args, $id_module, $array_return, $check_exceptions, $use_push = false, $id_shop = null);
        }
        static $disable_non_native_modules = null;
        if ($disable_non_native_modules === null)
            $disable_non_native_modules = (bool)Configuration::get('PS_DISABLE_NON_NATIVE_MODULE');
        if (($id_module && !is_numeric($id_module)) || !Validate::isHookName($hook_name))
            throw new PrestaShopException('Invalid id_module or hook_name');
        if (!$module_list = Hook::getHookModuleExecList($hook_name))
            return '';
        if (!$id_hook = Hook::getIdByName($hook_name))
            return false;
        Hook::$executed_hooks[$id_hook] = $hook_name;
        $live_edit = false;
        $context = Context::getContext();
        if (!isset($hook_args['cookie']) || !$hook_args['cookie'])
            $hook_args['cookie'] = $context->cookie;
        if (!isset($hook_args['cart']) || !$hook_args['cart'])
            $hook_args['cart'] = $context->cart;
        $retro_hook_name = Hook::getRetroHookName($hook_name);
        $altern = 0;
        $output = '';
        if ($disable_non_native_modules && !isset(Hook::$native_module))
            Hook::$native_module = Module::getNativeModuleList();
        $different_shop = false;
        if ($id_shop !== null && Validate::isUnsignedId($id_shop) && $id_shop != $context->shop->getContextShopID())
        {
            $old_context = $context->shop->getContext();
            $old_shop = clone $context->shop;
            $shop = new Shop((int)$id_shop);
            if (Validate::isLoadedObject($shop))
            {
                $context->shop = $shop;
                $context->shop->setContext(Shop::CONTEXT_SHOP, $shop->id);
                $different_shop = true;
            }
        }
        $since16011 = method_exists('Module', 'getExceptionsStatic');
        foreach ($module_list as $array)
        {
            if ($id_module && $id_module != $array['id_module'])
                continue;
            if ((bool)$disable_non_native_modules && <