Prestashop: CSS cache is not flushed automatically

Created on 13 Apr 2020  路  4Comments  路  Source: PrestaShop/PrestaShop

When you had CSS compress and combine enabled in Prestashop 1.6, it used to flush the cache automatically when some of the source CSS were changed.

This no longer happens, is it done on purpose?

I think the behavior should be the same as in TPL files, which listen for changes, if it's set so.

Additional information

  • PrestaShop version: 1.7.6.2
  • PHP version: 7.2
1.7.5.2 1.7.6.4 BO Bug Minor Performance To Do waiting for PM

All 4 comments

Hi @Hlavtox ,
The cache is cleared whenever a file is modified if the configuration is the following :
Capture d鈥檈虂cran 2020-04-16 a虁 10 47 12
I've tried changing the theme.css file of the classic template. After refreshing my page, I saw the updates. It works in both 1.7.6.4 and 1.7.5.2.

@florine2623 I am 99% sure that the settings in the screenshot are only related to TPL file changes.

  1. Set your CCC setting like this:
    V媒st艡i啪ek

  2. Open some page in FO to cache the CSS.

  3. Go to themes/themename/assets/css and change something in custom.css
    You can add body{background-color: red !important;} for example.

4. Go to FO, the changes are not visible.

  1. Clear cache manually or delete files in themes/themename/assets/cache and you will see the change.

Thanks for the details @Hlavtox.
I managed to reproduce the issue with PrestaShop version 1.7.6.4 and 1.7.5.2.
Indeed, when those 3 options are set in CCC, you need to clear cache manually to see css changes.
I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!

hola @PrestaShop/prestashop-product-team,
The behavior here needs to be investigated, does someone know what was the reason for the change between 1.6 and 1.7?

Was this page helpful?
0 / 5 - 0 ratings