Prestashop: Option to disable the cache system of ps_facetedsearch module

Created on 14 Apr 2020  Â·  11Comments  Â·  Source: PrestaShop/PrestaShop

Is your feature request related to a problem?

The cache system in ps_facetedsearch module increase database amount related to #17318
It's a normal behaviour but sometimes people don't want to store so much data in the database, more when they run in a poor server.

Describe the solution you'd like

Add an option to disable the cache if people are not able to add a clear cache cron.

BO Faceted search Improvement

Most helpful comment

Yes, good idea :+1:

All 11 comments

Thanks for opening this issue! We will help you to keep its state consistent

Hi @PierreRambaud,

Ping @PrestaShop/prestashop-product-team what do you think of this improvement?

Thanks!

Yes, good idea :+1:

Fixed by PrestaShop/ps_facetedsearch#169

Hi, I am running PrestaShop, version 1.7.6.8. My SQL table ps_layered_filter_block - (1.2 GiB), is running high in size. Do you have any suggestions on how to truncate its size (shrink it?). I am getting complaints from my host provider that I have reached the limit of 1000 MB. My online shop is not that large to consider an upgrade from my GoGeek subscription that should be really enough for my size online shop.

SiteGround says in an email sent to me this night:
"We have detected that MySQL database(s) on your account exceeds the maximum allowed size of 1000 per-database and we kindly ask you to reduce them within the next 7 days grace period. In case your database(s) still exceeds the allowed size after the grace period is over, a limit will be applied, which may result in the malfunctioning of your website.
racingho_newp 1220MB
How to lower resource usage
We have opened a usage report on that case in your User area, from where you can conveniently navigate to reduce MySQL size from your cPanel/PhpMyAdmin:
https://ua.siteground.com/usagereports.htm
Consider upgrade
If lowering the database size is not an option you might want to consider upgrading your account to a higher plan.
Thank you in advance for your understanding and cooperation!
Regards,
The SiteGround Team"

I would be very happy if you guys can give me advice on how to set the configuration in my PrestaShop correctly in order to avoid increasing the table: ps_layered_filter_block, on PrestaShop, version 1.7.6.8. Kind regards, Vidar

VidarPC:

Our workaround so far is to go into the Faceted Search module and click clear cache. This instantly reduced the DB to a more manageable size. You can then use the URL from the clear cache button to set up a cron task to do this daily.

The large cache grows unmanageably and I hope they do come up with an option to disable the cache. All it has done is create functional and performance issues with our site; ironic when it's supposed to help.

Anyway, hope this helps.

Hi, Thank you for replying to my issue concerning the Faceted Search module. I have included the croon jobs and will wait and see if this will help.

No problem – good luck.

From: VidarPc notifications@github.com
Sent: 18 November 2020 11:03
To: PrestaShop/PrestaShop PrestaShop@noreply.github.com
Cc: symphonytech111 junk@symphonymusic.co.uk; Comment comment@noreply.github.com
Subject: Re: [PrestaShop/PrestaShop] Option to disable the cache system of ps_facetedsearch module (#18618)

Hi, Thank you for replying to my issue concerning the Faceted Search module. I have included the croon jobs and will wait and see if this will help.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/PrestaShop/PrestaShop/issues/18618#issuecomment-729604869 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZC3NOYY72HOI6PCJ3W2I3SQOSVDANCNFSM4MHXV6AA . https://github.com/notifications/beacon/ANZC3NP6JFHZK6LOOEQEMILSQOSVDA5CNFSM4MHXV6AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFN6OGBI.gif

Hi,

It’s me again.

I put the three croon jobs in the Cpanel croon jobs setting at SiteGround and got these errors in my e-mail this morning:

Job 1:

/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 1: ?php: No such file or directory

/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 3: require_once: command not found

/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 4: require_once: command not found

/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 6: syntax error near unexpected token `Tools::encrypt'

/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 6: `if (substr(Tools::encrypt('ps_facetedsearch/index'), 0, 10) != Tools::getValue('token') || !Module::isInstalled('ps_facetedsearch')) {'

Job 2:

/bin/bash: /home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-price-indexer.php: Permission denied

Job 3:

/bin/bash: /home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-attribute-indexer.php: Permission denied

Are you able to see what I have put wrongly to have the jobs working properly?

With best regards, Vidar Bjerkeland

Fra: symphonytech111 notifications@github.com
Sendt: onsdag 18. november 2020 13:54
Til: PrestaShop/PrestaShop PrestaShop@noreply.github.com
Kopi: Vidar Kristian Bjerkeland vidar@bjerkeland.com; Comment comment@noreply.github.com
Emne: Re: [PrestaShop/PrestaShop] Option to disable the cache system of ps_facetedsearch module (#18618)

No problem – good luck.

From: VidarPc <[email protected] notifications@github.com >
Sent: 18 November 2020 11:03
To: PrestaShop/PrestaShop <[email protected] PrestaShop@noreply.github.com >
Cc: symphonytech111 <[email protected] junk@symphonymusic.co.uk >; Comment <[email protected] comment@noreply.github.com >
Subject: Re: [PrestaShop/PrestaShop] Option to disable the cache system of ps_facetedsearch module (#18618)

Hi, Thank you for replying to my issue concerning the Faceted Search module. I have included the croon jobs and will wait and see if this will help.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/PrestaShop/PrestaShop/issues/18618#issuecomment-729604869 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZC3NOYY72HOI6PCJ3W2I3SQOSVDANCNFSM4MHXV6AA . https://github.com/notifications/beacon/ANZC3NP6JFHZK6LOOEQEMILSQOSVDA5CNFSM4MHXV6AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFN6OGBI.gif

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/PrestaShop/PrestaShop/issues/18618#issuecomment-729630003 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AENN2KRBKUVTNW6UDTVHG53SQOYUJANCNFSM4MHXV6AA . https://github.com/notifications/beacon/AENN2KTXRF5V4ZTZ6IBC523SQOYUJA5CNFSM4MHXV6AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFN6UKMY.gif

Hi again, I am replying with the report from the e-mail's I got from SiteGround for the croon jobs that were supposed to run out last night.

I put the three croon jobs in the Cpanel croon jobs setting at SiteGround and got these errors in my e-mail this morning:

Job 1:

/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 1: ?php: No such file or directory
/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 3: require_once: command not found
/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 4: require_once: command not found
/home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 6: syntax error near unexpected token Tools::encrypt' /home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-clear-cache.php: line 6:if (substr(Tools::encrypt('ps_facetedsearch/index'), 0, 10) != Tools::getValue('token') || !Module::isInstalled('ps_facetedsearch')) {'

Job 2:

/bin/bash: /home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-price-indexer.php: Permission denied

Job 3:

/bin/bash: /home/racingho/public_html/modules/ps_facetedsearch/ps_facetedsearch-attribute-indexer.php: Permission denied

Are you able to see what I have put wrongly to have the jobs working properly?

With best regards, Vidar Bjerkeland

I did it by running the actual URL from the clear cache button eg:

https://xxxxxasdasd.com/modules/ps_facetedsearch/ps_facetedsearch-price-indexer.php?token=3210asd!EQ
(obviously your URL, and token number will be different)

If you right click on the clear cache button in the module, and select open in new window, the URL should be displayed that you need.

You can either run this URL in the Prestashop cron jobs module, or use your server CPanel Cron system with curl.

Was this page helpful?
0 / 5 - 0 ratings