Paul T.
Paul T.

Reputation: 576

Prestashop 1.6 CCC css new file in cache each time

I don't know how prestashop work. I'm a full stack developer and i need to resolve a problem in a prestashop project.

I use a theme "sns_kanta" modified by one other developper.

When i enable the css cache with the CCC options in dashboard, each time a user load a page, a compiled css file is created in cache folder in the theme. 1 page view = 1 new file.

Many time later... this give 28 GB useless data. Time passed to compile it is useless.

Anyone have an idea ? A start point for see where is the problem ? To debug it.

i try to check the prestashop documentation and try to see why css it's compiled each time ...

I know it's not easy without an access and all data, but if you have an idea, a file to check, ...

Thx a lot in advance

Upvotes: 1

Views: 1457

Answers (2)

Paul T.
Paul T.

Reputation: 576

I have an option in theme option like : -> ADVANCE SETTINGS -> SCSS Compile -> Always compile

I changed this to only if css file is not found.

useless time losed.

Thank's for the help and sorry.

Upvotes: 1

Florian Lemaitre
Florian Lemaitre

Reputation: 5748

You should have a look at displayHeader() method in classes/controller/FrontController.php. For each page, this method will check if CCC is activated and will accordingly assign one or multiple css files to the header of your page.

If CCC is activated, then the method cccCss() in classes/controller/Media.php is called. You can debug this method to find the file that have changed since last page load.

Upvotes: 1

Related Questions