Jump to content
JPresta.com

[Module] Page Cache - speed up your shop

Recommended Posts

Hello, 

 

I am using prestashop 1.6.1.2 and latest version of PageCache 3.09 and unfortunately I have to admit it recently just stopped working. We have a production store which has been selling over a year with this module but today I suddenly noticed that after adding a product to my shopping basket it disappears. Doesn't matter what's the next page I would visit, homepage, order page, CMS, it just says that my shopping cart is empty.

 

I've tried to use all test modes and debugging available in the module back office, but nothing helps. I disabled every single hook for cart block, then one by one to see if anything changes. Unfortunately no way. Even it's not possible to log in for a while. After clicking few pages you are automatically signed off and your cart is empty of course.

 

I had no choice but to uninstall and remove this module as frustrated customers were calling asking what they are doing wrong and I noticed just today that it's almost impossible to place an order with PageCache module enabled. It's a shame especially beause it worked for us for long months. 

 

I am also using all the cache built-in prestashop plus Xcache. I tried to disable them all and leave only pagecache enabled - unfortunately still products are removed from shopping basket, or rather user is no longer owner of his shopping basket as it's still present in back office, just customer doesn't have access to it.

 

If somebody could give an advice how to fix this that would be great, it is good module overall.

Hello,

When you encounter problems just ask here. Provide me temporary access to admin (permission to configure PageCache and access to Performance page) and I will have a look.

Regards

Share this post


Link to post
Share on other sites

I've sent you a message with all requsted information. Hopefully we will get this problem sorted as the module was working flawlessly for months and just suddenly stopped working.

Share this post


Link to post
Share on other sites

Hello,

 

I am using your module and I am really happy about it! It is speeding up my shop in just amazing way - there is a plenty of options but still few imho is missing and I will tell You about them in the end of this post. I am really impressed about this test mode in which we can set up all those things before we put it into production version. I really like the idea with setting up different cache times for main page, category, product etc.

 

I know that we can use wget function to index all of the pages to cache but there is one thing that I would love to see in future release - an option to clear all cache sites from specific shop pages like "delete all cache for category pages" or "delete all cache for products" or "delete all cached pages for products from specific category" - this will be awesome, because sometimes We are just making changes only for one section of the page and we don't want to clear all the cache (especially when using shared hosting). 

 

Overall module is 8+/10 - it is just worth it price.

 

EDIT: Oh, I found out that in  /cache/pagecache/1/ we have  two folders - product and category so if I will delete just the category folder manually that it will works? There is a To refresh cache of a specific product add "&product=<product's ids separated by commas>", for a category add "&category=<category's ids separated by commas>", for home page add "&index", etc.

 

Can You provide an example url for above?

 

Another question: what will hapen if will hit "Clear cache" in Advanced Parameters -> Performance? Is this will delete Your cached sites as well?

Another question 2: How to get those product attributes working again when cached? I cannot find out why it is not working on category page when PageCachce is enabled.

Edited by hakeryk2 (see edit history)

Share this post


Link to post
Share on other sites

Bonjour Jpresta, 

le module fonctionne trés trés bien.  Je suis vraiment satisfait. 

Mais depuis la mise en place de celui-ci le tabelau de bord dans l'admin ne se met plus à jour ... 

Comment corriger cela ?
Merci d'avance pour votre réponse

Share this post


Link to post
Share on other sites
Declaration of Media::cccCss($css_files) should be compatible with MediaCore::cccCss($css_files, $cache_path = NULL) in /home/web/public_html/override/classes/Media.php on line 0

Any clues??

Share this post


Link to post
Share on other sites

I asked the same question privately today.

I am waiting for the answer, but for now I editted /override/classes/Media.php.

Around line 43:

Replace public static function cccCss($css_files)

with:

public static function cccCss($css_files, $cache_path = null)

 

It seems, that the MediaCore declaration has been changed in the newest version.

 

Regards.

  • Like 1

Share this post


Link to post
Share on other sites

okay thanks, i disabled cache for now, when i dont get a reply i will try your solution..

Share this post


Link to post
Share on other sites

Welcome.

I am not suggesting this is a solution though. It's just a quick fix. There is no harm in this issue and you can run your shop if you disable dev-mode, except the clogging of the error logs IMHO.

Share this post


Link to post
Share on other sites

I am using your module and I am really happy about it! It is speeding up my shop in just amazing way - there is a plenty of options but still few imho is missing and I will tell You about them in the end of this post. I am really impressed about this test mode in which we can set up all those things before we put it into production version. I really like the idea with setting up different cache times for main page, category, product etc.

Thank you

 

EDIT: Oh, I found out that in  /cache/pagecache/1/ we have  two folders - product and category so if I will delete just the category folder manually that it will works? There is a To refresh cache of a specific product add "&product=<product's ids separated by commas>", for a category add "&category=<category's ids separated by commas>", for home page add "&index", etc.

 

Can You provide an example url for above?

You can delete the folder in /cache/pagecache/<shop ID>/product to delete the cache of all products pages or use the URL like this:

myshop.com/?fc=module&module=pagecache&controller=clearcache&token=ABSCDEF&product=1,2,3,10

 

Another question: what will hapen if will hit "Clear cache" in Advanced Parameters -> Performance? Is this will delete Your cached sites as well?

Yes, since version 3.04

 

Another question 2: How to get those product attributes working again when cached? I cannot find out why it is not working on category page when PageCachce is enabled.

If you have an issue with product attributes ask for support here

Edited by JPresta.com (see edit history)

Share this post


Link to post
Share on other sites

Bonjour Jpresta, 

le module fonctionne trés trés bien.  Je suis vraiment satisfait. 

Mais depuis la mise en place de celui-ci le tabelau de bord dans l'admin ne se met plus à jour ... 

Comment corriger cela ?

Merci d'avance pour votre réponse

PageCache peut réduire le nombre de visites et de pages vues dans les statistiques de Prestashop mais les stats sur nombre de ventes ne devraient pas être impactées ni les stats de Google Analytic.

Share this post


Link to post
Share on other sites

Hello, 

 

I am using prestashop 1.6.1.2 and latest version of PageCache 3.09 and unfortunately I have to admit it recently just stopped working. We have a production store which has been selling over a year with this module but today I suddenly noticed that after adding a product to my shopping basket it disappears. Doesn't matter what's the next page I would visit, homepage, order page, CMS, it just says that my shopping cart is empty.

 

I've tried to use all test modes and debugging available in the module back office, but nothing helps. I disabled every single hook for cart block, then one by one to see if anything changes. Unfortunately no way. Even it's not possible to log in for a while. After clicking few pages you are automatically signed off and your cart is empty of course.

 

I had no choice but to uninstall and remove this module as frustrated customers were calling asking what they are doing wrong and I noticed just today that it's almost impossible to place an order with PageCache module enabled. It's a shame especially beause it worked for us for long months. 

 

I am also using all the cache built-in prestashop plus Xcache. I tried to disable them all and leave only pagecache enabled - unfortunately still products are removed from shopping basket, or rather user is no longer owner of his shopping basket as it's still present in back office, just customer doesn't have access to it.

 

If somebody could give an advice how to fix this that would be great, it is good module overall.

Do you use Cloudflare?

Share this post


Link to post
Share on other sites

I have an issue with this module, whereby when a user is logged in and they navigate to a different page the logged in message disappears. It reverts back to the default 'Welcome, (Log in)' message even though the user is logged in.

 

I am using PrestaShop 1.6.3, anyone know how to fix it?

 

Thanks

 

 

Share this post


Link to post
Share on other sites

I have an issue with this module, whereby when a user is logged in and they navigate to a different page the logged in message disappears. It reverts back to the default 'Welcome, (Log in)' message even though the user is logged in.

 

I am using PrestaShop 1.6.3, anyone know how to fix it?

Go in configuration page, in dynamic modules tab, then see if you find the module that display these informations (usually 'user info block') in displayTop or displayNav hook. Make sure it's set as dynamic (check the box).

If it still does not work, do as hakeryk2 said, disable cache for logged in users (when user info is hard coded in theme, not in a module, you have no choice)

Share this post


Link to post
Share on other sites
Declaration of Media::cccCss($css_files) should be compatible with MediaCore::cccCss($css_files, $cache_path = NULL) in /home/web/public_html/override/classes/Media.php on line 0

Any clues??

 

@jpresta any answer on this??

Share this post


Link to post
Share on other sites

@jpresta any answer on this??

This is not important; Prestashop added a parameter with a default value to a function and the override does not have it. It's fixed in 3.11.

Share this post


Link to post
Share on other sites

I noticed some customers are having the dbgpagecache=1 in their link.
I'm not sure how this is possible, but to be sure, is there a way to switch off the debug panel completly from appearing (even if the link addition is used)?

 

kind regards, Willem-Jan

Share this post


Link to post
Share on other sites

I noticed some customers are having the dbgpagecache=1 in their link.

I'm not sure how this is possible, but to be sure, is there a way to switch off the debug panel completly from appearing (even if the link addition is used)?

Since version 3.08 this parameter is removed from URL in production mode, there is a 301 redirection so it is also removed from search engines.

Share this post


Link to post
Share on other sites

Since version 3.08 this parameter is removed from URL in production mode, there is a 301 redirection so it is also removed from search engines.

 

OK, thanks. I will upgrade to the latest version.

Share this post


Link to post
Share on other sites

I have installed this module and I must say that I am impressed with the speed the pages are now displayed on my site.  There are more expensive caching modules than this but Page Cache does everything I need.  You can check out the performance on www.galvoshredders.co.uk (based in the UK so there will be a network lag if you are in another country.)

 

The developer has also added a great function whereby you can clear the cache and statistics via a Cron job.  This allows me to clear the cache in the middle of the night before running a cache warming routine so that all my pages are cached and ready for visitors.  You may not want to do this if you have thousands of products, but this is the command I use:

 

wget -r -D www.domain.com -l3 -P temp -x -R "*cart*","*order*","*My Theme Name*" --delete-after --output-file=log.txt --no-verbose http://www.domain.com/

 

This touches all my pages without taking a long time or downloading the site.  You will obviously need to change 'domain' to your address and change 'My Theme Name' to your theme name (or delete this--it was just to stop wget from trawling areas I didn't want it to.)  The '*cart*' and '*order*' was to stop the products from being added to the cart.

 

Anyway, great module and fast response from the developer so I highly recommend it.

 

Can You explain exacly what every parameter is doing in this query?

 

What does means -r -D -l3 -P temp -x -R --no-verbose?

 

 

Share this post


Link to post
Share on other sites

Is there is any chance that someone will create a command which will get only page which contains some characters. In case above it is excluding those pages - how to create command that will get those with characters included? IE I want to get only pages that contains %chairs% in url. Maybe @pchapple can help? :)

Share this post


Link to post
Share on other sites

Hi,

 

I've been using your module for over a year now, and I love how it cuts TTFB from 1500-2000ms to only 500ms. That's a nice speed boost.

 

I have two questions though:

 

1) in my DB, the presta_jm_pagecache table is over 17Mb and doesn't clear when cache is emptied. Is that normal? Same for smarty_cache, btw.

 

2) When maintenance mode is activated, the shop still remains active instead of switching to the maintenance page: could this be caused by the cache module?

 

Thanks, and kind regards,

 

Dan

Share this post


Link to post
Share on other sites
1) in my DB, the presta_jm_pagecache table is over 17Mb and doesn't clear when cache is emptied. Is that normal? Same for smarty_cache, btw.

You must clear stats in PageCache to clear this table. To clear smarty cache go in Performance page.

 

2) When maintenance mode is activated, the shop still remains active instead of switching to the maintenance page: could this be caused by the cache module?

This is fixed in last versions, what version do you have?

Share this post


Link to post
Share on other sites

Hi,

 

Just bought the module and installed. Everything seems to work except "My account" block. The weird thing is that it still doesn't work even if I disable caching for logged in users like the wizard. If I disable the module, everything's good again. Is it possible to fix or is it just my theme that is poorly coded?

 

Site: https://www.supergangu.com

Edited by koskimaa (see edit history)

Share this post


Link to post
Share on other sites

Just bought the module and installed. Everything seems to work except "My account" block. The weird thing is that it still doesn't work even if I disable caching for logged in users like the wizard. If I disable the module, everything's good again. Is it possible to fix or is it just my theme that is poorly coded?

 

Site: https://www.supergangu.com

Ask for support here with temporary access to admin (permission to configure PageCache) and I will have a look.

Share this post


Link to post
Share on other sites

Hi

I have been using the module for 3 years or so but since the latest update the product price displays without tax. When I clear cache it changes but next day back to incorrect price. How do I fix this ?

www.findsforfabulouswomen.com.au

Edited by jayne514 (see edit history)

Share this post


Link to post
Share on other sites

I have been using the module for 3 years or so but since the latest update the product price displays without tax. When I clear cache it changes but next day back to incorrect price. How do I fix this ?

www.findsforfabulouswomen.com.au

Do you have some countries with the option "show prices without taxes" active?

Share this post


Link to post
Share on other sites

Only Australia where tax is included. I have just started to charge tax on 1 July. Maybe there is something I need to change  

Share this post


Link to post
Share on other sites

Only Australia where tax is included. I have just started to charge tax on 1 July. Maybe there is something I need to change  

Ask for support here with temporary access to admin (permission to configure PageCache) and I will have a look.

Share this post


Link to post
Share on other sites

Hi,


I just buy "Page Cache V3" on my Prestashop.

My first byte is still long

I think cache is auto regenerated ofr each load, if i look stats

For each loading (for same user) it create cache, and almost never use cache. some ideas ?

 

Share this post


Link to post
Share on other sites

I just buy "Page Cache V3" on my Prestashop.

 

My first byte is still long

 

I think cache is auto regenerated ofr each load, if i look stats

 

For each loading (for same user) it create cache, and almost never use cache. some ideas ?

It is probably not correctly installed. Ask for support here with temporary access to admin (permission to configure PageCache) and I will have a look.

  • Like 1

Share this post


Link to post
Share on other sites

It is probably not correctly installed. Ask for support here with temporary access to admin (permission to configure PageCache) and I will have a look.

 

I think so too, because TFB on my website dropped from 1500-2000ms to approximately 350-500ms. Impressive.

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

 

The socialsharing module generates an infinite number of smarty cache entries in /smarty/cache/socialsharing/ and /smarty/cache/socialsharing_header/ and the cache is never used as far as I can see. Only updated.

The number of files can be solved by just clearing the cache, but if I were to omit that, does this have any effect on the performance of page cache?

 

Thanks.

Share this post


Link to post
Share on other sites

The socialsharing module generates an infinite number of smarty cache entries in /smarty/cache/socialsharing/ and /smarty/cache/socialsharing_header/ and the cache is never used as far as I can see. Only updated.

The number of files can be solved by just clearing the cache, but if I were to omit that, does this have any effect on the performance of page cache?

If you clear the cache from performance page then it also clear the cache of PageCache.

I recommend you to only clear the /smarty/cache/socialsharing/ directory "manually".

Share this post


Link to post
Share on other sites

Hi,

Yet another question.

I have been mounting a tmpfs for /cache/pagecache/

and for /themes/mytheme/cache/

 

I was wondering if it would be unnecessary to put /cache/smarty/ on tmpfs as well, because maybe Pagecache does cache these files?

 

Thanks.

Share this post


Link to post
Share on other sites

Yet another question.

I have been mounting a tmpfs for /cache/pagecache/

and for /themes/mytheme/cache/

 

I was wondering if it would be unnecessary to put /cache/smarty/ on tmpfs as well, because maybe Pagecache does cache these files?

PageCache does not use these files, it only caches HTML so you should add /cache/smarty on tmpfs as well.

Share this post


Link to post
Share on other sites

Hi,

 

We purchased the module today and works great in terms of speed, site is a lot faster.

 

However, we have a few problems:

 

1. The modules caches the checkout page, whatever is in the basket when you go to checkout the content is different, eg 1 product is missing.

 

2. Also the same problem applies on order steps to check out, resulting in incomplete orders and wrong amount paid.

 

3. Some fonts and icons are disappearing when the module is ON, the website is not displaying them anymore.

 

We couldn't find any hooks in the module that could be helpful for what we need, any suggestion please?

 

Thanks!

Share this post


Link to post
Share on other sites

We purchased the module today and works great in terms of speed, site is a lot faster.

 

However, we have a few problems:

 

1. The modules caches the checkout page, whatever is in the basket when you go to checkout the content is different, eg 1 product is missing.

 

2. Also the same problem applies on order steps to check out, resulting in incomplete orders and wrong amount paid.

 

3. Some fonts and icons are disappearing when the module is ON, the website is not displaying them anymore.

 

We couldn't find any hooks in the module that could be helpful for what we need, any suggestion please?

This is weird since PageCache does not cache any page of the order process.

Send me temporary access to admin (Permission to configure PageCache and access to Performance page) with this form: https://addons.prestashop.com/en/write-to-developper?id_product=7939

Share this post


Link to post
Share on other sites

Hi,

 

Did you manage to have a look please? Anything we can do to make this work?

 

Thanks!

Share this post


Link to post
Share on other sites

Did you manage to have a look please? Anything we can do to make this work?

I answered you by email that the URL you gave me is wrong.

Share this post


Link to post
Share on other sites

Can you please try again, I've updated to latest version of PrestaShop 1.6.1.7, pagecache is active, feel free to test. I can't get the test mode window...

Share this post


Link to post
Share on other sites

Dear

 

I bought and used your module for years now.

 

But I'm still wanting improve performance

 

So I check one more time my website.

And if your module improve a lot my TTFB to +-250ms

 

I,m surprise to see the ajax request so slow -+1.5s on categorie page

?ajax=true&hook_0=displayTop|28&nocache=1475140097644

 

As the only dynamique module enable is blockuserinfo and ajax cart is enable.

 

Would you have any ideas

Share this post


Link to post
Share on other sites

I bought and used your module for years now.

 

But I'm still wanting improve performance

 

So I check one more time my website.

And if your module improve a lot my TTFB to +-250ms

 

I,m surprise to see the ajax request so slow -+1.5s on categorie page

?ajax=true&hook_0=displayTop|28&nocache=1475140097644

 

As the only dynamique module enable is blockuserinfo and ajax cart is enable.

 

Would you have any ideas

Make sure that smarty is enabled.

Even if you have one module, the prestashop engine/core is loaded during this request and can take time on small server.

Share this post


Link to post
Share on other sites

Many thanks for all your hard work and amazing support, the module is absolutely brilliant, as soon as you set up prestashop, this is the first module you have to buy!

  • Like 1

Share this post


Link to post
Share on other sites

Make sure that smarty is enabled.

Even if you have one module, the prestashop engine/core is loaded during this request and can take time on small server.

 

Make sure that smarty is enabled.

Even if you have one module, the prestashop engine/core is loaded during this request and can take time on small server.

Thanks for your answer.

 

 

But smarty is enable and I am on a quad-core vps with 4goRam?

 

That's why l'am surprise it takes 1s to get cart content!?

Share this post


Link to post
Share on other sites

Is there a way activate profiling with your module for only one IP?

Share this post


Link to post
Share on other sites

Is there a way activate profiling with your module for only one IP?

Profiling is a feature of Prestashop and I don't know if you can restrict it to one IP (I have never seen that).

Share this post


Link to post
Share on other sites

Is there a way activate profiling with your module for only one IP?

Try this in config.php:

/* Debug only */
if ($_SERVER['QUERY_STRING'] == 'error') {
define('_PS_MODE_DEV_', true);
}else{
define('_PS_MODE_DEV_', false);

and then for profiling:

 

 

if ($_SERVER['QUERY_STRING'] == 'profile') {
define('_PS_DEBUG_PROFILING_', true);
}else{
define('_PS_DEBUG_PROFILING_', false);
}

on PS 1.6.1.6 the script starts as follows:

 

 

/* Debug only */
if ($_SERVER['QUERY_STRING'] == 'error') {
define('_PS_MODE_DEV_', true);
}else{
define('_PS_MODE_DEV_', false);
}
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
if (_PS_MODE_DEV_ === true) {
    @ini_set('display_errors', 'on');
    @error_reporting(E_ALL | E_STRICT);
    define('_PS_DEBUG_SQL_', true);
} else {
    @ini_set('display_errors', 'off');
    define('_PS_DEBUG_SQL_', false);
}
if ($_SERVER['QUERY_STRING'] == 'profile') {
define('_PS_DEBUG_PROFILING_', true);
}else{
define('_PS_DEBUG_PROFILING_', false);
}



define('_PS_MODE_DEMO_', false);

$currentDir = dirname(__FILE__);

This way when you enter ?profile and ?error at the end of an URL you'll get the required information. :) You can change with more secret word because this approach is pretty well known now and many shops use it.

Share this post


Link to post
Share on other sites

Hi,

 

I see a lot of robot activity on parameters like these:

?ajax=true&hook_0=displayNav%7C28&hook_1=displayTop%7C28&hook_2=displayTop%7C98&hook_3=displayLeftColumn%7C82&nocache=1480578941458

 

Is this a resource which influence display?

Because I'd like to block it in my robots.txt, making the crawl more efficient.

 

Thanks.

Share this post


Link to post
Share on other sites

It might not be a problem. It's "just" a json response. Unfortunately these urls get indexed and into the serps by themselves.

And there is no way, that a rel="canonical" could be applied.

So I need to improve on my crawlbudget.

Share this post


Link to post
Share on other sites

I see a lot of robot activity on parameters like these:

?ajax=true&hook_0=displayNav%7C28&hook_1=displayTop%7C28&hook_2=displayTop%7C98&hook_3=displayLeftColumn%7C82&nocache=1480578941458

 

Is this a resource which influence display?

Because I'd like to block it in my robots.txt, making the crawl more efficient.

This is a GET request that refreshes the dynamic modules.

You can block it in robots.txt without problem.

Share this post


Link to post
Share on other sites

It might not be a problem. It's "just" a json response. Unfortunately these urls get indexed and into the serps by themselves.

And there is no way, that a rel="canonical" could be applied.

So I need to improve on my crawlbudget.

Do you mean you can find it in search engines results?

Anyway, you can block it in robots.txt

Share this post


Link to post
Share on other sites

This is a GET request that refreshes the dynamic modules.

You can block it in robots.txt without problem.

 

Just to chime in on this, I see that Webmastertools is frequently listing those URLs - not sure if they show up in search results though, but it might be a nice feature to disable indexing these URLS from the module BO.

 

Alternately, what syntax would you recommend to block these urls created by the module?

Share this post


Link to post
Share on other sites

Hi,

 

I added:

Disallow: /*hook_0*

in robots.txt in addition to the standard you can generate in the BO.

 

You can find these types of urls in the search results by typing this in Google's search form:

site:example.com inurl:hook_0

or more generic:

site:example.com inurl:ajax=true

The "inurl"-part obviously generates search results with the search term "ajax=true" appearing in the url.

Replace example.com with the correct domain :)

 

I hope this helps.

Regards.

Share this post


Link to post
Share on other sites

Hi,

 

I added:

Disallow: /*hook_0*

in robots.txt in addition to the standard you can generate in the BO.

 

You can find these types of urls in the search results by typing this in Google's search form:

site:example.com inurl:hook_0

or more generic:

site:example.com inurl:ajax=true

The "inurl"-part obviously generates search results with the search term "ajax=true" appearing in the url.

Replace example.com with the correct domain :)

 

I hope this helps.

Regards.

 

Hi,

 

I 'd like to update you on the the blocking of these json outputs and parameters.

Google Search console reports that Google sees these urls as resources and thus marks them as blocked.

 

So blocking these urls in the robots.txt is a bad piece of advice, as Google needs them to evaluate the pages.

Crawl budget is a big thing these days, though not new. Using a canonical isn't possible and doesn't help for crawl budget anyway..

Isn't it possible, to make this work through POST parameters, instead of GET?

 

Thanks.

Share this post


Link to post
Share on other sites

I 'd like to update you on the the blocking of these json outputs and parameters.

Google Search console reports that Google sees these urls as resources and thus marks them as blocked.

 

So blocking these urls in the robots.txt is a bad piece of advice, as Google needs them to evaluate the pages.

Crawl budget is a big thing these days, though not new. Using a canonical isn't possible and doesn't help for crawl budget anyway..

Isn't it possible, to make this work through POST parameters, instead of GET?

I don't know why it's a bad thing to block URL in robots.txt, this is the purpose of this file. It just tells search engines to not index those URLs.

Anyway, I think I have a solution (add 'content-type=application/json' in the header) so it will not be indexed anymore.

Share this post


Link to post
Share on other sites

I don't know why it's a bad thing to block URL in robots.txt, this is the purpose of this file. It just tells search engines to not index those URLs.

Anyway, I think I have a solution (add 'content-type=application/json' in the header) so it will not be indexed anymore.

If you block resources, Google will not be able to evaluate (or render) the page. Like css, js or images. It's a recommendation from Google. Blocking resources is bad.

Your solution is great. Though POST parameters would be nice too, as we then don't have alle those different urls anymore.

Share this post


Link to post
Share on other sites

I just found this article and wanted to share it with you as it explains a lot of things about Prestashop optimisation!

@jpresta.com

 

So you want an indepth speed optimization discussion on your main selling page, right? :)

Ok, I'll bite.

 

On a product listing (category) of 108 products on each page we have a TTFB of 0.21 sec.

That'll do pig, that'll do :)

So how did we do it?

System:

VPS with SSD, 2 cores, 4GB ram, Centos 6.8, Plesk.

Server: Apache-Nginx as reverse proxy, PHP-FPM. PHP7.

Site: https, http/2.

On CentOS < 7 ALPN is not supported, so not all browser support http/2, which is really a pity.

 

So the measures in (discutable) order of importance.

1. Run mysql tuner. http://mysqltuner.com/ and follow the advise. That will cover de DB remarks in the blogpost.

So now we have the queries in memory. We needed 0.5GB of memory. That doesn't cover it all, nut the cache efficiency is 99.9%.

2. As we have TLS (SSL) enabled, we activated OCSP stapling. This makes a huge difference in TTFB.

3. We put Page Cache and Smarty caches on tmpfs. So now we have caches in memory. How large these caches need to be depends on the number of pages and number of activated modules. In total and on average I would say you need around 1 GB of memory. Word of caution: do not pur /cache/ on 1 tmpfs. De cache root cannot be in memory. You need 2 seperate tmpfs for Smarty and Pagecache.

4. We activated Opcache. PHP7 is fast, With Opcache it's faster. So now we have compiled code in memory. We allocated 1 GB. However we allocated 2 GB and the Opcache is still full. I asked about this on this forum, but - I have to say - as usual, we didn't get an answer :( It might be a Plesk issue though.

5. We activated realpath_cache. Though it seems this cache is not persistent. Can't find any info on this.

6. Is we could, we'd blacklist the caching of a few files in Opcache. But we can't. It also might be a Plesk issue.

7. Disable access log for css, js, jpg.

 

So it's my belief, that as we have most data in memory, redis, varnish, memcache etc will not improve performance.

Though I haven't tested that. Also I haven't tested PHP7 against HHVM. About PHP7: You need one of the newer versions of PS 1.6.

 

Lessons learned: Before Nginx was easy to install on Plesk we had Apache-Fastcgi. So we had speed issues with Apache Worker and Prefork mode.

I do not fully understand, but the main issue was, that caching was not persistent. CentOS is hard to Upgrade. You basically need a new server.

If I had to do it over, I'd choose Ubuntu-Cpanel.

 

I am seriously interested in remarks to improve on this as I am not a system engineer expert. But just don't shoot the pig :)

 

 

Edited by Spark111 (see edit history)

Share this post


Link to post
Share on other sites

Buongiorno, è da un po di tempo che riscontro dei problemi.

 ora per esempio non potevo accedere al sito lato admin

nei log ho questi tipi di errore

 

PageCache | Cannot write file //httpdocs/cache/pagecache/1/category/0/1/011af1a8e53eb360ab8b337c2d4c4797.htm

PageCache | Cannot create directory it/httpdocs/cache/pagecache/1/index/9/c with grants 511

PageCache | Cannot create directory //httpdocs/cache/pagecache/1/category/d/5 with grants 511

PageCache | Cannot create directory /t/httpdocs/cache/pagecache/1/manufacturer/8/9 with grants 511

PageCache | Cannot write file /t/httpdocs/cache/pagecache/1/manufacturer/8/9/89bfe6fa1c999a1d0115f0d0a6f4ce89.htm

 

per poter ripristinare il lato admin , ho dovuto richiamare tramite cron  http://www.xxxxxxxx.it/?fc=module&module=pagecache&controller=clearcache&token=8DIWtKva5e84TjY7

che avevo salvato precedentemente come pagina web per poterla appunto richiamare.

 che sta succedendo ?

 è possibile ovviare a questa problematica

 

prestashop versione 1.6.1.6  pagecache modulo rev 3.17

 

grazie 

Alberto

 

 

 

 

Good morning, it is a bit of time that I have problems.  Now for example, I could not access the site admin side I log into these types of errors

 

PageCache | Cannot write file //httpdocs/cache/pagecache/1/category/0/1/011af1a8e53eb360ab8b337c2d4c4797.htm

PageCache | Cannot create directory it/httpdocs/cache/pagecache/1/index/9/c with grants 511

PageCache | Cannot create directory //httpdocs/cache/pagecache/1/category/d/5 with grants 511

PageCache | Cannot create directory /t/httpdocs/cache/pagecache/1/manufacturer/8/9 with grants 511

PageCache | Cannot write file /t/httpdocs/cache/pagecache/1/manufacturer/8/9/89bfe6fa1c999a1d0115f0d0a6f4ce89.htm

 

 

in order to restore the admin side, I had to call via cron http://www.xxxxxxxx.it/?fc=module&module=pagecache&controller=clearcache&token=8DIWtKva5e84TjY7 I had previously saved as a web page to be able to precisely recall.  what is happening ?  you can work around this problem

 

 

prestashop version 1.6.1.6 pagecache module Rev. 3.17 thank you Alberto

Good morning, it is a bit of time that I have problems.  Now for example, I could not access the site admin side I log into these types of errors

Share this post


Link to post
Share on other sites
Good morning, it is a bit of time that I have problems.  Now for example, I could not access the site admin side I log into these types of errors

 

PageCache | Cannot write file //httpdocs/cache/pagecache/1/category/0/1/011af1a8e53eb360ab8b337c2d4c4797.htm

PageCache | Cannot create directory it/httpdocs/cache/pagecache/1/index/9/c with grants 511

PageCache | Cannot create directory //httpdocs/cache/pagecache/1/category/d/5 with grants 511

PageCache | Cannot create directory /t/httpdocs/cache/pagecache/1/manufacturer/8/9 with grants 511

PageCache | Cannot write file /t/httpdocs/cache/pagecache/1/manufacturer/8/9/89bfe6fa1c999a1d0115f0d0a6f4ce89.htm

 

 

in order to restore the admin side, I had to call via cron http://www.xxxxxxxx.it/?fc=module&module=pagecache&controller=clearcache&token=8DIWtKva5e84TjY7 I had previously saved as a web page to be able to precisely recall.  what is happening ?  you can work around this problem

 

 

prestashop version 1.6.1.6 pagecache module Rev. 3.17 thank you Alberto

Good morning, it is a bit of time that I have problems.  Now for example, I could not access the site admin side I log into these types of errors

Your hard disk is probably full.

Check your quota/plan with your hosting provider.

Share this post


Link to post
Share on other sites

Hi JPresta.com !

 

I have a question for you. Is Redis cache compatible with your module?

 

Best regards

MacRoy

 

 

 

Edited by MacRoy (see edit history)

Share this post


Link to post
Share on other sites

I have a question for you. Is Redis cache compatible with your module?

Why not? It's an independant caching system so it does not interfer with PageCache. It will only be an other layer of cache.

Share this post


Link to post
Share on other sites

Hi, 

 

First of all , Awesome Module!

 

I´m having the following issue:

 

1. My Blockcart and Block User Info are not dynamically refreshing so they are showing a cache version. I´m using blockcart without ajax, i just dont like the ajax version for conversion. I also tested selecting block cart and user info on the dynamic list but the issue persisted.

 

 

For reference I see this error also in the console: 

 

 

 

(index):9 Uncaught ReferenceError: ajaxCart is not defined

    at Object.success ((index):1813)
    at j (v_69_3d3a02f….js:2)
    at Object.fireWith [as resolveWith] (v_69_3d3a02f….js:2)
    at x (v_69_3d3a02f….js:4)
    at XMLHttpRequest.b (v_69_3d3a02f….js:4)
    at XMLHttpRequest.nrWrapper ((index):9)

 

 

2. Is there is a way we can refresh the cache of selected pages, like for example empty only the cache of the home page, or this cms or this product?

3.What configuration do you recommend on prestashop performance tab, we only have the smart ccs and js , do you recommend any other and are all of them compatible with your module? 

 

My Site: melocompro .com .co  

Share this post


Link to post
Share on other sites

Hi, 

 

First of all , Awesome Module!

 

I´m having the following issue:

 

1. My Blockcart and Block User Info are not dynamically refreshing so they are showing a cache version. I´m using blockcart without ajax, i just dont like the ajax version for conversion. I also tested selecting block cart and user info on the dynamic list but the issue persisted.

 

For reference I see this error also in the console: 

 

2. Is there is a way we can refresh the cache of selected pages, like for example empty only the cache of the home page, or this cms or this product?

3.What configuration do you recommend on prestashop performance tab, we only have the smart ccs and js , do you recommend any other and are all of them compatible with your module? 

 

My Site: melocompro .com .co  

I configured it for you, now it's ok.

Share this post


Link to post
Share on other sites

Hi,

I'm getting error on the front end → Fatal error: Call to undefined method PageCache::isRestrictedCountry() in /home/drcncpt/domains/dronconcept.pl/public_html/modules/pagecache/pagecache.php on line 1420

 

Is this a known problem? and Could you help me resolving that?

Regards,

Mathias.

Share this post


Link to post
Share on other sites

Hi,

I'm getting error on the front end → Fatal error: Call to undefined method PageCache::isRestrictedCountry() in /home/drcncpt/domains/dronconcept.pl/public_html/modules/pagecache/pagecache.php on line 1420

 

Is this a known problem? and Could you help me resolving that?

Regards,

Mathias.

The override of FrontController is probably not installed correctly. This can happen when

  • the FrontController override is not located in /overrides/classes/controller but in another directory under /overrides
  • a module replace the override with its own each time it is changed (yes, some modules do that like "Facebook promote")
  • you installed overrides manually and forgot this one.

If you don't find a way to fix it contact me via this form.

Share this post


Link to post
Share on other sites

Anyone else has problems with this module in multistore?
I am not able to activate the module correct. On the module page, it looks like it is in live mode, but at my store front, the test url is still working.

Share this post


Link to post
Share on other sites

Hi, I installed "Page Cache" on Prestashop 1.6.1.12
I have a problem with the module "Layered navigation block". It no load the items present in the filter that I select.
I flag the module in to the dynamic loading section in all hooks, saved reactivated the "Page Cache" module and clear cache.

Unfortunately still not working.

What can I do?

Share this post


Link to post
Share on other sites

Hi, I installed "Page Cache" on Prestashop 1.6.1.12

I have a problem with the module "Layered navigation block". It no load the items present in the filter that I select.

I flag the module in to the dynamic loading section in all hooks, saved reactivated the "Page Cache" module and clear cache.

Unfortunately still not working.

What can I do?

I answered to the support request you made on addons (need temp access to analyse the problem)

Share this post


Link to post
Share on other sites

Hi, I upgraded to presta 1616, but now the website gives an error HTTP ERROR 500

Tis happened  after I deleted the cache a couple of times. What should I do now to get my website back online?

Edited by lendfie (see edit history)

Share this post


Link to post
Share on other sites

Hi, I upgraded to presta 1616, but now the website gives an error HTTP ERROR 500

Tis happened  after I deleted the cache a couple of times. What should I do now to get my website back online?

First enable DEV mode in /config/defines.inc.php file to see what is the error.

Share this post


Link to post
Share on other sites

Ehm how do I do that? I am not a programmer but just quite handy

define('_PS_MODE_DEV_', true);

 

Once you have the error message set it back to false.

Share this post


Link to post
Share on other sites

hi, I found out that one of the module that generate a category list menu in the front page is taking very long to load everytime, causing my site very slow to be fully loaded, I tried to find some settings on the page cache but it seems it is not cached???

Share this post


Link to post
Share on other sites

hi, I found out that one of the module that generate a category list menu in the front page is taking very long to load everytime, causing my site very slow to be fully loaded, I tried to find some settings on the page cache but it seems it is not cached???

PageCache caches wholes pages so this module is also cached. Make sure you did not set it as dynamic.

Share this post


Link to post
Share on other sites

ok, i got this message in dev mode after installing page cache

 

 

 

 

Fatal error: Uncaught exception 'PrestaShopException' with message 'Invalid product vars' in /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/classes/Link.php:106 Stack trace: #0 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/PageCacheDAO.php(436): LinkCore->getProductLink(0) #1 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/PageCacheDAO.php(388): PageCacheDAO::_getDefaultLink('product', '0') #2 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/PageCacheDAO.php(178): PageCacheDAO::clearCacheOfObject('product', '0', true) #3 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/pagecache.php(1097): PageCacheDAO::triggerReffreshment() #4 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/override/classes/Dispatcher.php(276): PageCache::getCacheFile() #5 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/override/classes/D in /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/classes/Link.php on line 106

Share this post


Link to post
Share on other sites

I am having problems with this module and Advanced Seach 4 module. On first visit to a page the left search features are cached.

 

Anybody found a solution to this?

Share this post


Link to post
Share on other sites

ok, i got this message in dev mode after installing page cache

 

 

 

 

Fatal error: Uncaught exception 'PrestaShopException' with message 'Invalid product vars' in /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/classes/Link.php:106 Stack trace: #0 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/PageCacheDAO.php(436): LinkCore->getProductLink(0) #1 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/PageCacheDAO.php(388): PageCacheDAO::_getDefaultLink('product', '0') #2 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/PageCacheDAO.php(178): PageCacheDAO::clearCacheOfObject('product', '0', true) #3 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/modules/pagecache/pagecache.php(1097): PageCacheDAO::triggerReffreshment() #4 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/override/classes/Dispatcher.php(276): PageCache::getCacheFile() #5 /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/override/classes/D in /var/www/vhosts/50/209036/webspace/siteapps/Prestashop-329155/htdocs/classes/Link.php on line 106

Which PS version and PageCache version? Is it a fresh install of PageCache or an upgrade?

Share this post


Link to post
Share on other sites